private static void processNeverReferencedCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException { final PersistenceContext persistenceContext = session.getPersistenceContext(); final CollectionEntry entry = persistenceContext.getCollectionEntry( coll ); if ( LOG.isDebugEnabled() ) { LOG.debugf( "Found collection with unloaded owner: %s", MessageHelper.collectionInfoString( entry.getLoadedPersister(), coll, entry.getLoadedKey(), session ) ); } entry.setCurrentPersister( entry.getLoadedPersister() ); entry.setCurrentKey( entry.getLoadedKey() ); prepareCollectionForUpdate( coll, entry, session.getFactory() ); }
/** * record the fact that this collection was dereferenced * * @param coll The collection to be updated by un-reachability. * @param session The session */ public static void processUnreachableCollection(PersistentCollection coll, SessionImplementor session) { if ( coll.getOwner() == null ) { processNeverReferencedCollection( coll, session ); } else { processDereferencedCollection( coll, session ); } }
Object processCollection(Object collection, CollectionType type) throws HibernateException { if (collection==CollectionType.UNFETCHED_COLLECTION) { return null; } if (collection!=null) { final PersistentCollection coll; if ( type.hasHolder() ) { coll = getSession().getPersistenceContext().getCollectionHolder(collection); } else if ( collection == LazyPropertyInitializer.UNFETCHED_PROPERTY ) { coll = (PersistentCollection) type.resolve( collection, getSession(), owner ); } else { coll = (PersistentCollection) collection; } Collections.processReachableCollection( coll, type, owner, getSession() ); } return null; }
CollectionEntry ce = me.getValue(); if ( !ce.isReached() && !ce.isIgnore() ) { Collections.processUnreachableCollection( me.getKey(), session );
final EntityTypeDescriptor ownerEntityDescriptor = getOwnerEntityDescriptor( loadedDescriptor, session.getSessionFactory() prepareCollectionForUpdate( coll, entry );
CollectionEntry ce = me.getValue(); if ( !ce.isReached() && !ce.isIgnore() ) { Collections.processUnreachableCollection( me.getKey(), session );
final EntityTypeDescriptor ownerEntityDescriptor = getOwnerEntityDescriptor( collectionAttribute.getCollectionDescriptor(), factory ); final boolean isBytecodeEnhanced = ownerEntityDescriptor.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading(); if ( isBytecodeEnhanced && !collection.wasInitialized() ) { prepareCollectionForUpdate( collection, ce );
/** * record the fact that this collection was dereferenced * * @param coll The collection to be updated by un-reachability. */ @SuppressWarnings( {"JavaDoc"}) public static void processUnreachableCollection(PersistentCollection coll, SessionImplementor session) { if ( coll.getOwner()==null ) { processNeverReferencedCollection(coll, session); } else { processDereferencedCollection(coll, session); } }
prepareCollectionForUpdate( coll, entry, session.getFactory() );
Object processCollection(Object collection, CollectionType type) throws HibernateException { if (collection==CollectionType.UNFETCHED_COLLECTION) { return null; } if (collection!=null) { final PersistentCollection coll; if ( type.hasHolder() ) { coll = getSession().getPersistenceContext().getCollectionHolder(collection); } else { coll = (PersistentCollection) collection; } Collections.processReachableCollection( coll, type, owner, getSession() ); } return null; }
CollectionEntry ce = me.getValue(); if ( !ce.isReached() && !ce.isIgnore() ) { Collections.processUnreachableCollection( me.getKey(), session );
/** * record the fact that this collection was dereferenced * * @param coll The collection to be updated by un-reachability. */ @SuppressWarnings( {"JavaDoc"}) public static void processUnreachableCollection(PersistentCollection coll, SessionImplementor session) { if ( coll.getOwner()==null ) { processNeverReferencedCollection(coll, session); } else { processDereferencedCollection(coll, session); } }
prepareCollectionForUpdate( collection, ce, factory );
Object processCollection(Object collection, CollectionType type) throws HibernateException { if (collection==CollectionType.UNFETCHED_COLLECTION) { return null; } if (collection!=null) { final PersistentCollection coll; if ( type.hasHolder() ) { coll = getSession().getPersistenceContext().getCollectionHolder(collection); } else { coll = (PersistentCollection) collection; } Collections.processReachableCollection( coll, type, owner, getSession() ); } return null; }
CollectionEntry ce = me.getValue(); if ( !ce.isReached() && !ce.isIgnore() ) { Collections.processUnreachableCollection( me.getKey(), session );
/** * record the fact that this collection was dereferenced * * @param coll The collection to be updated by un-reachability. * @param session The session */ public static void processUnreachableCollection(PersistentCollection coll, SessionImplementor session) { if ( coll.getOwner() == null ) { processNeverReferencedCollection( coll, session ); } else { processDereferencedCollection( coll, session ); } }
private static void processNeverReferencedCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException { final PersistenceContext persistenceContext = session.getPersistenceContext(); CollectionEntry entry = persistenceContext.getCollectionEntry(coll); if ( LOG.isDebugEnabled() ) { LOG.debugf( "Found collection with unloaded owner: %s", MessageHelper.collectionInfoString( entry.getLoadedPersister(), entry.getLoadedKey(), session.getFactory() ) ); } entry.setCurrentPersister( entry.getLoadedPersister() ); entry.setCurrentKey( entry.getLoadedKey() ); prepareCollectionForUpdate( coll, entry, session.getFactory() ); }
@Override Object processCollection(Object collection, PluralPersistentAttribute collectionAttribute) throws HibernateException { if ( collection == PersistentCollectionDescriptor.UNFETCHED_COLLECTION ) { return null; } if (collection!=null) { final PersistentCollection coll; if ( collectionAttribute.getPersistentCollectionDescriptor().getCollectionClassification() == CollectionClassification.ARRAY ) { coll = getSession().getPersistenceContext().getCollectionHolder(collection); } else if ( collection == LazyPropertyInitializer.UNFETCHED_PROPERTY ) { throw new NotYetImplementedFor6Exception( "processCollection + LazyPropertyInitializer.UNFETCHED_PROPERTY" ); } else { coll = (PersistentCollection) collection; } Collections.processReachableCollection( coll, collectionAttribute, owner, getSession() ); } return null; }
private static void processNeverReferencedCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException { final PersistenceContext persistenceContext = session.getPersistenceContext(); CollectionEntry entry = persistenceContext.getCollectionEntry(coll); if ( LOG.isDebugEnabled() ) { LOG.debugf( "Found collection with unloaded owner: %s", MessageHelper.collectionInfoString( entry.getLoadedPersister(), entry.getLoadedKey(), session.getFactory() ) ); } entry.setCurrentPersister( entry.getLoadedPersister() ); entry.setCurrentKey( entry.getLoadedKey() ); prepareCollectionForUpdate( coll, entry, session.getFactory() ); }
private static void processNeverReferencedCollection(PersistentCollection coll, SessionImplementor session) throws HibernateException { final PersistenceContext persistenceContext = session.getPersistenceContext(); final CollectionEntry entry = persistenceContext.getCollectionEntry( coll ); if ( LOG.isDebugEnabled() ) { LOG.debugf( "Found collection with unloaded owner: %s", MessageHelper.collectionInfoString( entry.getLoadedCollectionDescriptor(), coll, entry.getLoadedKey(), session ) ); } entry.setCurrentDescriptor( entry.getLoadedCollectionDescriptor() ); entry.setCurrentKey( entry.getLoadedKey() ); prepareCollectionForUpdate( coll, entry); }