code
stringlengths
3
1.18M
language
stringclasses
1 value
package de.blinkt.openvpn.core; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.NetworkInfo.State; import android.prefer...
Java
package de.blinkt.openvpn.core; import java.util.Locale; class CIDRIP { String mIp; int len; public CIDRIP(String ip, String mask) { mIp = ip; long netmask = getInt(mask); // Add 33. bit to ensure the loop terminates netmask += 1l << 32; int lenZeros = 0; ...
Java
package de.blinkt.openvpn.core; import android.util.Log; import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.VpnStatus.ConnectionStatus; import de.blinkt.openvpn.core.VpnStatus.LogItem; import java.io.*; import java.text.SimpleDateFormat; import java.util.*; impor...
Java
package de.blinkt.openvpn.core; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import android.content.Context; import android.content.Intent; import android.os.Build; import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; public class VPNLaunch...
Java
package de.blinkt.openvpn.core; import android.content.Context; import android.text.TextUtils; import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; import org.spongycastle.util.io.pem.PemObject; import org.spongycastle.util.io.pem.PemReader; import javax.security.auth.x500.X500Principal; import java.io....
Java
package de.blinkt.openvpn.core; import android.annotation.TargetApi; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.RestrictionEntry; import android.os.Build; import android.os.Bundle; import java.util.ArrayL...
Java
package de.blinkt.openvpn.core; import android.content.Context; import android.content.SharedPreferences; import android.net.LocalServerSocket; import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.os.ParcelFileDescriptor; import android.preference.PreferenceManager; import and...
Java
package de.blinkt.openvpn.core; public interface OpenVPNManagement { enum pauseReason { noNetwork, userPause, screenOff } int mBytecountInterval =2; void reconnect(); void pause(pauseReason reason); void resume(); boolean stopVPN(); }
Java
package de.blinkt.openvpn.core;/* * This software is provided 'as-is', without any express or implied * warranty. In no event will Google be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applic...
Java
package de.blinkt.openvpn.core; import java.net.InetSocketAddress; import java.net.MalformedURLException; import java.net.Proxy; import java.net.ProxySelector; import java.net.SocketAddress; import java.net.URISyntaxException; import java.net.URL; import java.util.List; import de.blinkt.openvpn.R; import de.blinkt.op...
Java
package de.blinkt.openvpn.core; import android.annotation.SuppressLint; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.Signature; import android.os.Build; import a...
Java
package de.blinkt.openvpn.core; import java.io.FileNotFoundException; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.StreamCorruptedException; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Set; import ...
Java
package de.blinkt.openvpn.core; import android.os.Build; import android.text.TextUtils; import java.math.BigInteger; import java.net.Inet6Address; import java.util.*; public class NetworkSpace { static class ipAddress implements Comparable<ipAddress> { private BigInteger netAddress; public int ...
Java
package de.blinkt.openvpn.core; import android.app.Application; /** * Created by arne on 28.12.13. */ public class ICSOpenVPNApplication extends Application { @Override public void onCreate() { super.onCreate(); PRNGFixes.apply(); } }
Java
package de.blinkt.openvpn.core; import de.blinkt.openvpn.VpnProfile; import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Vector; //! Openvpn Config FIle Parser, probably not 100% accurate b...
Java
package de.blinkt.openvpn.fragments; import java.io.File; import java.util.ArrayList; import android.app.Fragment; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.net.Uri; import androi...
Java
package de.blinkt.openvpn.fragments; import android.os.Bundle; import android.preference.PreferenceFragment; import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.ProfileManager; public abstract class OpenVpnPreferencesFragment extends PreferenceFragment { protect...
Java
package de.blinkt.openvpn.fragments; import android.app.Fragment; import android.app.PendingIntent; import android.content.*; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; im...
Java
package de.blinkt.openvpn.fragments; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.TreeMap; import android.app.AlertDialog; import android.app.ListFragment; import android.os.Bundle; import android.view.LayoutInflater; impor...
Java
package de.blinkt.openvpn.fragments; import android.app.Activity; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.ListPreference; import android.preference.Preference;...
Java
package de.blinkt.openvpn.fragments; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import de.bl...
Java
package de.blinkt.openvpn.fragments; import android.app.Fragment; import android.os.Bundle; import android.text.Html; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import de.blinkt.openvpn.R; ...
Java
package de.blinkt.openvpn.fragments; import java.io.File; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.pm.ApplicationInfo; import android.content....
Java
package de.blinkt.openvpn.fragments; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import de.blinkt.openvpn.R; public class Settings_Routing ex...
Java
package de.blinkt.openvpn.fragments; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.app.*; import android.content.*; import android.database.DataSetObserver; import android.graphics.drawable.Drawable; import android.os.Bundle...
Java
package de.blinkt.openvpn.fragments; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import de.blinkt.op...
Java
package de.blinkt.openvpn.fragments; import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import androi...
Java
package de.blinkt.openvpn.fragments; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.PreferenceManager; import android.pr...
Java
package de.blinkt.openvpn.fragments; import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.provider.OpenableColumns; import android.util.Base64; import android.util.Log; import ...
Java
package de.blinkt.openvpn.fragments; import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Fragment; import android.content.ActivityNotFoundException; import android.content.Intent; import android.os.Build; import an...
Java
package de.blinkt.openvpn.fragments; import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.app.ListFragment; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.drawable.Drawable; impor...
Java
package de.blinkt.openvpn; import java.io.IOException; import android.app.Activity; import android.app.AlertDialog; import android.content.ActivityNotFoundException; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.content.Sh...
Java
package com.app.service.impl; import com.app.service.CalculeService; public class CalculeServiceImpl implements CalculeService{ @Override public int somme(int num1, int num2) { int som=num1+num2; return som; } }
Java
package pl.wroc.pwr.psi.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.wroc.pwr.psi.entity.ElementPlanu; import pl.wroc.pwr.psi.repository.ElementPlanuRepository; @Service public class ElementPlanuService { @A...
Java
package pl.wroc.pwr.psi.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.wroc.pwr.psi.entity.Synonim; import pl.wroc.pwr.psi.repository.SlowoKluczoweRepository; import pl.wroc.pwr.psi.repository.SynonimRepository; /** * * @author wpos...
Java
package pl.wroc.pwr.psi.service; import java.util.HashSet; import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.wroc.pwr.psi.entity.PytanieOtwarte; import pl.wroc.pwr.psi.entity.SlowoKluczowe; import pl.wr...
Java
package pl.wroc.pwr.psi.service; import java.util.Collection; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.wroc.pwr.psi.entity.SlowoKluczowe; import pl.wroc.pwr.psi.entity.Synonim; import pl.wroc.pwr.psi.repository.Slow...
Java
package pl.wroc.pwr.psi.service; import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.wroc.pwr.psi.entity.PytanieOtwarte; import pl.wroc.pwr.psi.repository.PytanieOtwarteRepository; /** * * @author wpo...
Java
package pl.wroc.pwr.psi.service; import java.util.ArrayList; import java.util.HashSet; import java.util.TreeMap; import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pl.wroc.pwr.psi.entity.Opcja; ...
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.PytanieZamkniete; public interface PytanieZamknieteRepository extends JpaRepository<PytanieZamkniete, Integer>{ }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.PytanieOtwarte; /** * * @author wposlednicka * */ public interface PytanieOtwarteRepository extends JpaRepository<PytanieOtwarte, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.PytanieOtwarteToSzablon; public interface PytanieOtwarteToSzablonRepository extends JpaRepository<PytanieOtwarteToSzablon, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.PytanieZamknieteToSzablon; public interface PytanieZamknieteToSzablonRepository extends JpaRepository<PytanieZamknieteToSzablon, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.PytanieOtwarteToSzablon; import pl.wroc.pwr.psi.entity.PytanieToSzablon; public interface PytanieToSzablonRepository extends JpaRepository<PytanieToSzablon, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.ElementPlanu; public interface ElementPlanuRepository extends JpaRepository<ElementPlanu, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.SlowoKluczoweToPytanieOtwarte; import pl.wroc.pwr.psi.entity.Szablon; public interface SlowoKluczoweToPytanieOtwarteRepository extends JpaRepository<SlowoKluczoweToPytanieOtwarte, Integer> ...
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.Synonim; public interface SynonimRepository extends JpaRepository<Synonim, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.SlowoKluczowe; /** * * @author wposlednicka * */ public interface SlowoKluczoweRepository extends JpaRepository<SlowoKluczowe, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.Opcja; public interface OpcjaRepository extends JpaRepository<Opcja, Integer> { }
Java
package pl.wroc.pwr.psi.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.wroc.pwr.psi.entity.Szablon; public interface SzablonRepository extends JpaRepository<Szablon, Integer> { }
Java
package pl.wroc.pwr.psi.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation...
Java
package pl.wroc.pwr.psi.controller; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.Req...
Java
package pl.wroc.pwr.psi.controller; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; impor...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright (c) 2000 - 2009 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without li...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); yo...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); yo...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
/*- * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
Java
/*- * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
Java
package transactions; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.Entity; import javax.persistence.Id; import transactions.BookReview; @Entity(name = "Book") public class Book { @Id private String isbn; private String title; private String autho...
Java
package transactions; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; public final class EMF { private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional"); private EMF() {} public static EntityManage...
Java
package transactions; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; import java.util.SimpleTimeZone; import javax.persistence.EntityManagerFactory; import javax.pers...
Java
package ids; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; public final class EMF { private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional"); private EMF() {} public static EntityManagerFactory ...
Java
package ids; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; @Entity(name = "BookStringId") public class BookStringId { // String ID field: entities of this class use key names set by // the app prior to saving, and do not have ancestors (entity // group parents). ...
Java
package ids; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Entity; // import javax.persistence.GeneratedValue; // import javax.persistence.GenerationType; import javax.persistence.Id; import org.datanucleus.jpa.annotations.Extension; import com.google.appengine.api.datastore.Key; impo...
Java
package ids; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Date; import java.util.SimpleTimeZone; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityManager; import javax.servlet.http.*; import com.google.appengine.api.datastore.K...
Java
package properties; import javax.persistence.Embeddable; // A class that can be used as a JPA embeddable field. Fields are // stored as individual properties of the data object that has the // field, and can be indexed and queried. @Embeddable public class Publisher { private String name; private String mai...
Java
package properties; import java.util.Date; import java.util.List; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import javax.p...
Java
package properties; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; public final class EMF { private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional"); private EMF() {} public static EntityManagerF...
Java
package properties; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.SimpleTimeZone; import javax.persistence.EntityManagerFactory; import javax.pers...
Java
package properties; import java.io.Serializable; import java.util.Date; // A Serializable class that can be a field type, stored as a // datastore blob property value (not indexed). There are no special // JPA annotations needed for this; any Serializable class will work. public class PublisherMetadata implements S...
Java
package relationships; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToOne; import javax.persistence.OneToMany; import relationships.BookCoverImage; import relati...
Java
package relationships; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; public final class EMF { private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional"); private EMF() {} public static EntityManag...
Java
package relationships; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; import java.util.SimpleTimeZone; import javax.persistence.EntityManagerFactory; import javax.per...
Java
package queries; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; @Entity(name = "Book") public class Book { @Id private String isbn; private String title; private String author; private int copyrightYear; private Date authorBirthdate; public Book(Stri...
Java