Object processCollection(Object collection, CollectionType type) throws HibernateException { if ( collection != null ) { final SessionImplementor session = getSession(); final PersistentCollection persistentCollection; if ( type.isArrayType() ) { persistentCollection = session.getPersistenceContext().getCollectionHolder( collection ); // if no array holder we found an unwrappered array (this can't occur, // because we now always call wrap() before getting to here) // return (ah==null) ? true : searchForDirtyCollections(ah, type); } else { // if not wrappered yet, its dirty (this can't occur, because // we now always call wrap() before getting to here) // return ( ! (obj instanceof PersistentCollection) ) ? //true : searchForDirtyCollections( (PersistentCollection) obj, type ); persistentCollection = (PersistentCollection) collection; } if ( persistentCollection.isDirty() ) { //we need to check even if it was not initialized, because of delayed adds! dirty = true; return null; //NOTE: EARLY EXIT! } } return null; }
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; }
PersistentCollection ah = persistenceContext.getCollectionHolder( collection ); if ( ah == null ) { ah = collectionType.wrap( session, collection );
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; }
Object processCollection(Object collection, CollectionType type) throws HibernateException { if (collection!=null) { SessionImplementor session = getSession(); final PersistentCollection persistentCollection; if ( type.isArrayType() ) { persistentCollection = session.getPersistenceContext().getCollectionHolder(collection); // if no array holder we found an unwrappered array (this can't occur, // because we now always call wrap() before getting to here) // return (ah==null) ? true : searchForDirtyCollections(ah, type); } else { // if not wrappered yet, its dirty (this can't occur, because // we now always call wrap() before getting to here) // return ( ! (obj instanceof PersistentCollection) ) ? //true : searchForDirtyCollections( (PersistentCollection) obj, type ); persistentCollection = (PersistentCollection) collection; } if ( persistentCollection.isDirty() ) { //we need to check even if it was not initialized, because of delayed adds! dirty=true; return null; //NOTE: EARLY EXIT! } } return null; }
Object processCollection(Object collection, CollectionType type) throws HibernateException { if (collection!=null) { SessionImplementor session = getSession(); final PersistentCollection persistentCollection; if ( type.isArrayType() ) { persistentCollection = session.getPersistenceContext().getCollectionHolder(collection); // if no array holder we found an unwrappered array (this can't occur, // because we now always call wrap() before getting to here) // return (ah==null) ? true : searchForDirtyCollections(ah, type); } else { // if not wrappered yet, its dirty (this can't occur, because // we now always call wrap() before getting to here) // return ( ! (obj instanceof PersistentCollection) ) ? //true : searchForDirtyCollections( (PersistentCollection) obj, type ); persistentCollection = (PersistentCollection) collection; } if ( persistentCollection.isDirty() ) { //we need to check even if it was not initialized, because of delayed adds! dirty=true; return null; //NOTE: EARLY EXIT! } } return null; }
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; }
@Override Object processCollection(Object collection, PluralPersistentAttribute collectionAttribute) throws HibernateException { if ( collection != null ) { final SessionImplementor session = getSession(); final PersistentCollection persistentCollection; if ( collectionAttribute.getPersistentCollectionDescriptor().getCollectionClassification() == CollectionClassification.ARRAY ) { persistentCollection = session.getPersistenceContext().getCollectionHolder( collection ); // if no array holder we found an unwrappered array (this can't occur, // because we now always call wrap() before getting to here) // return (ah==null) ? true : searchForDirtyCollections(ah, type); } else { // if not wrappered yet, its dirty (this can't occur, because // we now always call wrap() before getting to here) // return ( ! (obj instanceof PersistentCollection) ) ? //true : searchForDirtyCollections( (PersistentCollection) obj, type ); persistentCollection = (PersistentCollection) collection; } if ( persistentCollection.isDirty() ) { //we need to check even if it was not initialized, because of delayed adds! dirty = true; return null; //NOTE: EARLY EXIT! } } return null; }
@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; }
PersistentCollection ah = persistenceContext.getCollectionHolder( collection ); if ( ah == null ) { ah = collectionDescriptor.wrap( session, collection );
PersistentCollection ah = persistenceContext.getCollectionHolder(collection); if (ah==null) { ah = collectionType.wrap(session, collection);
PersistentCollection ah = persistenceContext.getCollectionHolder(collection); if (ah==null) { ah = collectionType.wrap(session, collection);