org.hibernate.engine
Class CollectionLoadContext

java.lang.Object
  extended byorg.hibernate.engine.CollectionLoadContext

public class CollectionLoadContext
extends Object

Represents the state of collections currently being loaded. Eventually, I would like to have multiple instances of this per session - one per JDBC result set, instead of the resultSetId being passed.

Author:
Gavin King

Constructor Summary
CollectionLoadContext(PersistenceContext context)
           
 
Method Summary
 void endLoadingCollections(CollectionPersister persister, Object resultSetId, SessionImplementor session)
          Finish the process of loading collections for a particular result set
 PersistentCollection getLoadingCollection(CollectionPersister persister, Serializable id, EntityMode em)
          Retrieve a collection that is in the process of being loaded, returning null if there is no loading collection with the given id
 PersistentCollection getLoadingCollection(CollectionPersister persister, Serializable key, Object resultSetId, EntityMode em)
          Retrieve a collection that is in the process of being loaded, instantiating a new collection if there is nothing for the given id, or returning null if the collection with the given id is already fully loaded in the session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionLoadContext

public CollectionLoadContext(PersistenceContext context)
Method Detail

getLoadingCollection

public PersistentCollection getLoadingCollection(CollectionPersister persister,
                                                 Serializable key,
                                                 Object resultSetId,
                                                 EntityMode em)
                                          throws HibernateException
Retrieve a collection that is in the process of being loaded, instantiating a new collection if there is nothing for the given id, or returning null if the collection with the given id is already fully loaded in the session

Throws:
HibernateException

getLoadingCollection

public PersistentCollection getLoadingCollection(CollectionPersister persister,
                                                 Serializable id,
                                                 EntityMode em)
Retrieve a collection that is in the process of being loaded, returning null if there is no loading collection with the given id


endLoadingCollections

public void endLoadingCollections(CollectionPersister persister,
                                  Object resultSetId,
                                  SessionImplementor session)
                           throws HibernateException
Finish the process of loading collections for a particular result set

Throws:
HibernateException