Codota Logo
ExternalizablePersistentSet.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.granite.messaging.persistence.ExternalizablePersistentSet
constructor

Best Java code snippets using org.granite.messaging.persistence.ExternalizablePersistentSet.<init> (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.graniteds/granite-server-hibernate4

protected AbstractExternalizablePersistentCollection newExternalizableCollection(PersistentCollection value) {
  final boolean initialized = Hibernate.isInitialized(value);
  final boolean dirty = value.isDirty();
  
  AbstractExternalizablePersistentCollection coll = null;
  
  if (value instanceof PersistentSet)
    coll = new ExternalizablePersistentSet(initialized ? (Set<?>)value : null, initialized, dirty);
  else if (value instanceof PersistentList)
    coll = new ExternalizablePersistentList(initialized ? (List<?>)value : null, initialized, dirty);
  else if (value instanceof PersistentBag)
    coll = new ExternalizablePersistentBag(initialized ? (List<?>)value : null, initialized, dirty);
  else if (value instanceof PersistentMap)
    coll = new ExternalizablePersistentMap(initialized ? (Map<?, ?>)value : null, initialized, dirty);
  else
    throw new UnsupportedOperationException("Unsupported Hibernate collection type: " + value);
  if (serializeMetadata != SerializeMetadata.NO && (serializeMetadata == SerializeMetadata.YES || !initialized) && value.getRole() != null) {
    char[] hexKey = StringUtil.bytesToHexChars(serializeSerializable(value.getKey()));
    char[] hexSnapshot = StringUtil.bytesToHexChars(serializeSerializable(value.getStoredSnapshot()));
    String metadata = new StringBuilder(hexKey.length + 1 + hexSnapshot.length + 1 + value.getRole().length())
      .append(hexKey).append(':')
      .append(hexSnapshot).append(':')
      .append(value.getRole())
      .toString();
    coll.setMetadata(metadata);
  }
  
  return coll;
}
origin: org.graniteds/granite-server-datanucleus

    value = new ExternalizablePersistentSet((Set<?>)null, false, false);
  else
    value = new ExternalizablePersistentList((List<?>)null, false, false);
value = new ExternalizablePersistentSet(((Set<?>)value).toArray(), true, false);
org.granite.messaging.persistenceExternalizablePersistentSet<init>

Popular methods of ExternalizablePersistentSet

  • getContentAsSet
  • setContentFromSet

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Kernel (java.awt.image)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now