@Override @SuppressWarnings("unchecked") public Object getSnapshotElement(Object entry, int i) { final Map sn = (Map) getSnapshot(); return sn.get( ( (Map.Entry) entry ).getKey() ); }
@Override @SuppressWarnings("unchecked") public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException { final Map sn = (Map) getSnapshot(); final Map.Entry e = (Map.Entry) entry; return e.getValue() != null && sn.get( e.getKey() ) == null; }
@Override @SuppressWarnings("unchecked") public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException { final List deletes = new ArrayList(); for ( Object o : ((Map) getSnapshot()).entrySet() ) { final Entry e = (Entry) o; final Object key = e.getKey(); if ( e.getValue() != null && map.get( key ) == null ) { deletes.add( indexIsFormula ? e.getValue() : key ); } } return deletes.iterator(); }
@Override @SuppressWarnings("unchecked") public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException { final Map sn = (Map) getSnapshot(); final Map.Entry e = (Map.Entry) entry; final Object snValue = sn.get( e.getKey() ); return e.getValue() != null && snValue != null && elemType.isDirty( snValue, e.getValue(), getSession() ); }
@Override public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException { final Type elementType = persister.getElementType(); final Map snapshotMap = (Map) getSnapshot(); if ( snapshotMap.size() != this.map.size() ) { return false; } for ( Object o : map.entrySet() ) { final Entry entry = (Entry) o; if ( elementType.isDirty( entry.getValue(), snapshotMap.get( entry.getKey() ), getSession() ) ) { return false; } } return true; }
@Override @SuppressWarnings("unchecked") public V getSnapshotElement(Object entry, int index) { final Map<K,V> sn = (Map) getSnapshot(); return sn.get( ( (Map.Entry<K,V>) entry ).getKey() ); }
public Object getSnapshotElement(Object entry, int i) { final Map sn = (Map) getSnapshot(); return sn.get( ( (Map.Entry) entry ).getKey() ); }
public Object getSnapshotElement(Object entry, int i) { final Map sn = (Map) getSnapshot(); return sn.get( ( (Map.Entry) entry ).getKey() ); }
public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException { final Map sn = (Map) getSnapshot(); Map.Entry e = (Map.Entry) entry; return e.getValue()!=null && sn.get( e.getKey() )==null; }
@Override @SuppressWarnings("unchecked") public boolean needsInserting(Object entry, int i) throws HibernateException { final Map sn = (Map) getSnapshot(); final Map.Entry e = (Map.Entry) entry; return e.getValue() != null && sn.get( e.getKey() ) == null; }
public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException { final Map sn = (Map) getSnapshot(); Map.Entry e = (Map.Entry) entry; return e.getValue()!=null && sn.get( e.getKey() )==null; }
@Override @SuppressWarnings("unchecked") public Iterator getDeletes(PersistentCollectionDescriptor descriptor, boolean indexIsFormula) throws HibernateException { final List deletes = new ArrayList(); for ( Object o : ((Map) getSnapshot()).entrySet() ) { final Entry e = (Entry) o; final Object key = e.getKey(); if ( e.getValue() != null && map.get( key ) == null ) { deletes.add( indexIsFormula ? e.getValue() : key ); } } return deletes.iterator(); }
public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException { List deletes = new ArrayList(); Iterator iter = ( (Map) getSnapshot() ).entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry e = (Map.Entry) iter.next(); Object key = e.getKey(); if ( e.getValue()!=null && map.get(key)==null ) { deletes.add( indexIsFormula ? e.getValue() : key ); } } return deletes.iterator(); }
public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException { List deletes = new ArrayList(); Iterator iter = ( (Map) getSnapshot() ).entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry e = (Map.Entry) iter.next(); Object key = e.getKey(); if ( e.getValue()!=null && map.get(key)==null ) { deletes.add( indexIsFormula ? e.getValue() : key ); } } return deletes.iterator(); }
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException { Type elementType = persister.getElementType(); Map xmap = (Map) getSnapshot(); if ( xmap.size()!=this.map.size() ) return false; Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry entry = (Map.Entry) iter.next(); if ( elementType.isDirty( entry.getValue(), xmap.get( entry.getKey() ), getSession() ) ) return false; } return true; }
@Override public boolean equalsSnapshot(PersistentCollectionDescriptor collectionDescriptor) throws HibernateException { final Map snapshotMap = (Map) getSnapshot(); if ( snapshotMap.size() != this.map.size() ) { return false; } for ( Object o : map.entrySet() ) { final Entry entry = (Entry) o; if ( collectionDescriptor.isDirty( entry.getValue(), snapshotMap.get( entry.getKey() ), getSession() ) ) { return false; } } return true; }
public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException { final Map sn = (Map) getSnapshot(); Map.Entry e = (Map.Entry) entry; Object snValue = sn.get( e.getKey() ); return e.getValue()!=null && snValue!=null && elemType.isDirty( snValue, e.getValue(), getSession() ); }
public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException { final Map sn = (Map) getSnapshot(); Map.Entry e = (Map.Entry) entry; Object snValue = sn.get( e.getKey() ); return e.getValue()!=null && snValue!=null && elemType.isDirty( snValue, e.getValue(), getSession() ); }
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException { Type elementType = persister.getElementType(); Map xmap = (Map) getSnapshot(); if ( xmap.size()!=this.map.size() ) return false; Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry entry = (Map.Entry) iter.next(); if ( elementType.isDirty( entry.getValue(), xmap.get( entry.getKey() ), getSession() ) ) return false; } return true; }
@Override @SuppressWarnings("unchecked") public boolean needsUpdating(Object entry, int i) throws HibernateException { final Map sn = (Map) getSnapshot(); final Map.Entry e = (Map.Entry) entry; final Object snValue = sn.get( e.getKey() ); return e.getValue() != null && snValue != null && getCollectionDescriptor().isDirty( snValue, e.getValue(), getSession() ); }