public int numberOfCollectionRemovals() { if( collectionRemovals == null ) { return 0; } return collectionRemovals.size(); }
public int numberOfInsertions() { if( insertions == null ) { return 0; } return insertions.size(); }
public int numberOfUpdates() { if( updates == null ) { return 0; } return updates.size(); }
public int numberOfCollectionCreations() { if( collectionCreations == null ) { return 0; } return collectionCreations.size(); }
public int numberOfCollectionUpdates() { if( collectionUpdates == null ) { return 0; } return collectionUpdates.size(); }
public void clearFromFlushNeededCheck(int previousCollectionRemovalSize) { if( collectionCreations != null ) { collectionCreations.clear(); } if( collectionUpdates != null ) { collectionUpdates.clear(); } if( collectionQueuedOps != null ) { collectionQueuedOps.clear(); } if( updates != null) { updates.clear(); } // collection deletions are a special case since update() can add // deletions of collections not loaded by the session. if ( collectionRemovals != null && collectionRemovals.size() > previousCollectionRemovalSize ) { collectionRemovals.removeLastN( collectionRemovals.size() - previousCollectionRemovalSize ); } }
LOG.tracev( "Deserialized [{0}] entries", l.size() );
public void unScheduleDeletion(EntityEntry entry, Object rescuedEntity) { if ( rescuedEntity instanceof HibernateProxy ) { LazyInitializer initializer = ( (HibernateProxy) rescuedEntity ).getHibernateLazyInitializer(); if ( !initializer.isUninitialized() ) { rescuedEntity = initializer.getImplementation( session ); } } if( deletions != null ) { for ( int i = 0; i < deletions.size(); i++ ) { EntityDeleteAction action = deletions.get( i ); if (action.getInstance() == rescuedEntity) { deletions.remove( i ); return; } } } if( orphanRemovals != null ) { for ( int i = 0; i < orphanRemovals.size(); i++ ) { EntityDeleteAction action = orphanRemovals.get( i ); if (action.getInstance() == rescuedEntity) { orphanRemovals.remove( i ); return; } } } throw new AssertionFailure( "Unable to perform un-delete for instance " + entry.getEntityName() ); }
public int numberOfCollectionRemovals() { if( collectionRemovals == null ) { return 0; } return collectionRemovals.size(); }
public int numberOfCollectionUpdates() { if( collectionUpdates == null ) { return 0; } return collectionUpdates.size(); }
public int numberOfCollectionCreations() { if( collectionCreations == null ) { return 0; } return collectionCreations.size(); }
public int numberOfUpdates() { if( updates == null ) { return 0; } return updates.size(); }
public int numberOfInsertions() { if( insertions == null ) { return 0; } return insertions.size(); }
public void clearFromFlushNeededCheck(int previousCollectionRemovalSize) { if( collectionCreations != null ) { collectionCreations.clear(); } if( collectionUpdates != null ) { collectionUpdates.clear(); } if( collectionQueuedOps != null ) { collectionQueuedOps.clear(); } if( updates != null) { updates.clear(); } // collection deletions are a special case since update() can add // deletions of collections not loaded by the session. if ( collectionRemovals != null && collectionRemovals.size() > previousCollectionRemovalSize ) { collectionRemovals.removeLastN( collectionRemovals.size() - previousCollectionRemovalSize ); } }
LOG.tracev( "Deserialized [{0}] entries", l.size() );
public void unScheduleDeletion(EntityEntry entry, Object rescuedEntity) { if ( rescuedEntity instanceof HibernateProxy ) { LazyInitializer initializer = ( (HibernateProxy) rescuedEntity ).getHibernateLazyInitializer(); if ( !initializer.isUninitialized() ) { rescuedEntity = initializer.getImplementation( session ); } } if( deletions != null ) { for ( int i = 0; i < deletions.size(); i++ ) { EntityDeleteAction action = deletions.get( i ); if (action.getInstance() == rescuedEntity) { deletions.remove( i ); return; } } } if( orphanRemovals != null ) { for ( int i = 0; i < orphanRemovals.size(); i++ ) { EntityDeleteAction action = orphanRemovals.get( i ); if (action.getInstance() == rescuedEntity) { orphanRemovals.remove( i ); return; } } } throw new AssertionFailure( "Unable to perform un-delete for instance " + entry.getEntityName() ); }