Tabnine Logo
PersistentIdentifierBag.getSnapshot
Code IndexAdd Tabnine to your IDE (free)

How to use
getSnapshot
method
in
org.hibernate.collection.internal.PersistentIdentifierBag

Best Java code snippets using org.hibernate.collection.internal.PersistentIdentifierBag.getSnapshot (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

@Override
public boolean needsInserting(Object entry, int i, Type elemType)
    throws HibernateException {
  final Map snap = (Map) getSnapshot();
  final Object id = identifiers.get( i );
  return entry != null
      && ( id==null || snap.get( id )==null );
}
origin: hibernate/hibernate-orm

@Override
public Object getSnapshotElement(Object entry, int i) {
  final Map snap = (Map) getSnapshot();
  final Object id = identifiers.get( i );
  return snap.get( id );
}
origin: hibernate/hibernate-orm

@Override
@SuppressWarnings("unchecked")
public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException {
  final Map snap = (Map) getSnapshot();
  final List deletes = new ArrayList( snap.keySet() );
  for ( int i=0; i<values.size(); i++ ) {
    if ( values.get( i ) != null ) {
      deletes.remove( identifiers.get( i ) );
    }
  }
  return deletes.iterator();
}
origin: hibernate/hibernate-orm

@Override
public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException {
  if ( entry == null ) {
    return false;
  }
  final Map snap = (Map) getSnapshot();
  final Object id = identifiers.get( i );
  if ( id == null ) {
    return false;
  }
  final Object old = snap.get( id );
  return old != null && elemType.isDirty( old, entry, getSession() );
}
origin: hibernate/hibernate-orm

@Override
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException {
  final Type elementType = persister.getElementType();
  final Map snap = (Map) getSnapshot();
  if ( snap.size()!= values.size() ) {
    return false;
  }
  for ( int i=0; i<values.size(); i++ ) {
    final Object value = values.get( i );
    final Object id = identifiers.get( i );
    if ( id == null ) {
      return false;
    }
    final Object old = snap.get( id );
    if ( elementType.isDirty( old, value, getSession() ) ) {
      return false;
    }
  }
  return true;
}
origin: org.hibernate/com.springsource.org.hibernate

public boolean needsInserting(Object entry, int i, Type elemType)
  throws HibernateException {
  Map snap = (Map) getSnapshot();
  Object id = identifiers.get( i );
  return entry!=null && ( id==null || snap.get(id)==null );
}
origin: org.hibernate/com.springsource.org.hibernate

public Object getSnapshotElement(Object entry, int i) {
  Map snap = (Map) getSnapshot();
  Object id = identifiers.get( i );
  return snap.get(id);
}
origin: org.hibernate.orm/hibernate-core

@Override
public boolean needsInserting(Object entry, int i)
    throws HibernateException {
  final Map snap = (Map) getSnapshot();
  final Object id = identifiers.get( i );
  return entry != null
      && ( id==null || snap.get( id )==null );
}
origin: org.hibernate/com.springsource.org.hibernate.core

public Object getSnapshotElement(Object entry, int i) {
  Map snap = (Map) getSnapshot();
  Object id = identifiers.get( i );
  return snap.get(id);
}
origin: org.hibernate.orm/hibernate-core

@Override
public E getSnapshotElement(Object entry, int index) {
  final Map<?,E> snap = (Map) getSnapshot();
  final Object id = identifiers.get( index );
  return snap.get( id );
}
origin: org.hibernate/com.springsource.org.hibernate.core

public boolean needsInserting(Object entry, int i, Type elemType)
  throws HibernateException {
  Map snap = (Map) getSnapshot();
  Object id = identifiers.get( i );
  return entry!=null && ( id==null || snap.get(id)==null );
}
origin: org.hibernate/com.springsource.org.hibernate

public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException {
  Map snap = (Map) getSnapshot();
  List deletes = new ArrayList( snap.keySet() );
  for ( int i=0; i<values.size(); i++ ) {
    if ( values.get(i)!=null ) deletes.remove( identifiers.get( i ) );
  }
  return deletes.iterator();
}
origin: org.hibernate.orm/hibernate-core

@Override
@SuppressWarnings("unchecked")
public Iterator getDeletes(PersistentCollectionDescriptor descriptor, boolean indexIsFormula) throws HibernateException {
  final Map snap = (Map) getSnapshot();
  final List deletes = new ArrayList( snap.keySet() );
  for ( int i=0; i<values.size(); i++ ) {
    if ( values.get( i ) != null ) {
      deletes.remove( identifiers.get( i ) );
    }
  }
  return deletes.iterator();
}
origin: org.hibernate/com.springsource.org.hibernate.core

public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException {
  Map snap = (Map) getSnapshot();
  List deletes = new ArrayList( snap.keySet() );
  for ( int i=0; i<values.size(); i++ ) {
    if ( values.get(i)!=null ) deletes.remove( identifiers.get( i ) );
  }
  return deletes.iterator();
}
origin: org.hibernate/com.springsource.org.hibernate.core

public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException {
  Type elementType = persister.getElementType();
  Map snap = (Map) getSnapshot();
  if ( snap.size()!= values.size() ) return false;
  for ( int i=0; i<values.size(); i++ ) {
    Object value = values.get(i);
    Object id = identifiers.get( i );
    if (id==null) return false;
    Object old = snap.get(id);
    if ( elementType.isDirty( old, value, getSession() ) ) return false;
  }
  return true;
}
origin: org.hibernate/com.springsource.org.hibernate

public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException {
  if (entry==null) return false;
  Map snap = (Map) getSnapshot();
  Object id = identifiers.get( i );
  if (id==null) return false;
  Object old = snap.get(id);
  return old!=null && elemType.isDirty( old, entry, getSession() );
}
origin: org.hibernate/com.springsource.org.hibernate.core

public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException {
  if (entry==null) return false;
  Map snap = (Map) getSnapshot();
  Object id = identifiers.get( i );
  if (id==null) return false;
  Object old = snap.get(id);
  return old!=null && elemType.isDirty( old, entry, getSession() );
}
origin: org.hibernate/com.springsource.org.hibernate

public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException {
  Type elementType = persister.getElementType();
  Map snap = (Map) getSnapshot();
  if ( snap.size()!= values.size() ) return false;
  for ( int i=0; i<values.size(); i++ ) {
    Object value = values.get(i);
    Object id = identifiers.get( i );
    if (id==null) return false;
    Object old = snap.get(id);
    if ( elementType.isDirty( old, value, getSession() ) ) return false;
  }
  return true;
}
origin: org.hibernate.orm/hibernate-core

@Override
public boolean equalsSnapshot(PersistentCollectionDescriptor<?,?,E> collectionDescriptor) throws HibernateException {
  final Map snap = (Map) getSnapshot();
  if ( snap.size()!= values.size() ) {
    return false;
  }
  for ( int i=0; i<values.size(); i++ ) {
    final Object value = values.get( i );
    final Object id = identifiers.get( i );
    if ( id == null ) {
      return false;
    }
    final Object old = snap.get( id );
    if ( collectionDescriptor.isDirty( old, value, getSession() ) ) {
      return false;
    }
  }
  return true;
}
origin: org.hibernate.orm/hibernate-core

@Override
public boolean needsUpdating(Object entry, int i) throws HibernateException {
  if ( entry == null ) {
    return false;
  }
  final Map snap = (Map) getSnapshot();
  final Object id = identifiers.get( i );
  if ( id == null ) {
    return false;
  }
  final Object old = snap.get( id );
  return old != null && getCollectionDescriptor().isDirty( old, entry, getSession() );
}
org.hibernate.collection.internalPersistentIdentifierBaggetSnapshot

Popular methods of PersistentIdentifierBag

  • remove
  • <init>
    Constructs a PersistentIdentifierBag.
  • add
  • beforeAdd
  • beforeInitialize
  • beforeRemove
  • dirty
  • getCachedSize
  • getOrphans
  • getSession
  • initialize
  • read
  • initialize,
  • read,
  • readSize,
  • setDirectlyAccessible,
  • setInitialized,
  • write,
  • clear,
  • getCollectionDescriptor,
  • isDirty

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Table (org.hibernate.mapping)
    A relational table
  • Runner (org.openjdk.jmh.runner)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now