@Override public Object removeProxy(EntityKey key) { if ( batchFetchQueue != null ) { batchFetchQueue.removeBatchLoadableEntityKey( key ); batchFetchQueue.removeSubselect( key ); } return proxiesByKey.remove( key ); }
@Override public Object removeEntity(EntityKey key) { final Object entity = entitiesByKey.remove( key ); final Iterator itr = entitiesByUniqueKey.values().iterator(); while ( itr.hasNext() ) { if ( itr.next() == entity ) { itr.remove(); } } // Clear all parent cache parentsByChild.clear(); entitySnapshotsByKey.remove( key ); nullifiableEntityKeys.remove( key ); if( batchFetchQueue != null ) { getBatchFetchQueue().removeBatchLoadableEntityKey(key); getBatchFetchQueue().removeSubselect(key); } return entity; }
@Override public Object removeProxy(EntityKey key) { if ( batchFetchQueue != null ) { batchFetchQueue.removeBatchLoadableEntityKey( key ); batchFetchQueue.removeSubselect( key ); } return proxiesByKey.remove( key ); }
/** * Remove a proxy from the session cache. * <p/> * Additionally, ensure that any load optimization references * such as batch or subselect loading get cleaned up as well. * * @param key The key of the entity proxy to be removed * @return The proxy reference. */ @Override public Object removeProxy(EntityKey key) { if ( batchFetchQueue != null ) { batchFetchQueue.removeBatchLoadableEntityKey( key ); batchFetchQueue.removeSubselect( key ); } return proxiesByKey.remove( key ); }
/** * Remove a proxy from the session cache. * <p/> * Additionally, ensure that any load optimization references * such as batch or subselect loading get cleaned up as well. * * @param key The key of the entity proxy to be removed * @return The proxy reference. */ @Override public Object removeProxy(EntityKey key) { if ( batchFetchQueue != null ) { batchFetchQueue.removeBatchLoadableEntityKey( key ); batchFetchQueue.removeSubselect( key ); } return proxiesByKey.remove( key ); }
@Override public Object removeEntity(EntityKey key) { final Object entity = entitiesByKey.remove( key ); final Iterator itr = entitiesByUniqueKey.values().iterator(); while ( itr.hasNext() ) { if ( itr.next() == entity ) { itr.remove(); } } // Clear all parent cache parentsByChild.clear(); entitySnapshotsByKey.remove( key ); nullifiableEntityKeys.remove( key ); if( batchFetchQueue != null ) { getBatchFetchQueue().removeBatchLoadableEntityKey(key); getBatchFetchQueue().removeSubselect(key); } return entity; }
/** * Remove an entity from the session cache, also clear * up other state associated with the entity, all except * for the <tt>EntityEntry</tt> */ @Override public Object removeEntity(EntityKey key) { Object entity = entitiesByKey.remove(key); Iterator iter = entitiesByUniqueKey.values().iterator(); while ( iter.hasNext() ) { if ( iter.next()==entity ) iter.remove(); } // Clear all parent cache parentsByChild.clear(); entitySnapshotsByKey.remove(key); nullifiableEntityKeys.remove(key); getBatchFetchQueue().removeBatchLoadableEntityKey(key); getBatchFetchQueue().removeSubselect(key); return entity; }
/** * Remove an entity from the session cache, also clear * up other state associated with the entity, all except * for the <tt>EntityEntry</tt> */ @Override public Object removeEntity(EntityKey key) { Object entity = entitiesByKey.remove(key); Iterator iter = entitiesByUniqueKey.values().iterator(); while ( iter.hasNext() ) { if ( iter.next()==entity ) iter.remove(); } // Clear all parent cache parentsByChild.clear(); entitySnapshotsByKey.remove(key); nullifiableEntityKeys.remove(key); getBatchFetchQueue().removeBatchLoadableEntityKey(key); getBatchFetchQueue().removeSubselect(key); return entity; }