org.hibernate.engine.loading
Class CollectionLoadContext

java.lang.Object
  extended by org.hibernate.engine.loading.CollectionLoadContext

public class CollectionLoadContext
extends Object

Represents state associated with the processing of a given ResultSet in regards to loading collections.

Another implementation option to consider is to not expose ResultSets directly (in the JDBC redesign) but to always "wrap" them and apply a [series of] context[s] to that wrapper.

Author:
Steve Ebersole

Constructor Summary
CollectionLoadContext(LoadContexts loadContexts, ResultSet resultSet)
          Creates a collection load context for the given result set.
 
Method Summary
 void endLoadingCollections(CollectionPersister persister)
          Finish the process of collection-loading for this bound result set.
 LoadContexts getLoadContext()
           
 PersistentCollection getLoadingCollection(CollectionPersister persister, Serializable key)
          Retrieve the collection that is being loaded as part of processing this result set.
 ResultSet getResultSet()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionLoadContext

public CollectionLoadContext(LoadContexts loadContexts,
                             ResultSet resultSet)
Creates a collection load context for the given result set.

Parameters:
loadContexts - Callback to other collection load contexts.
resultSet - The result set this is "wrapping".
Method Detail

getResultSet

public ResultSet getResultSet()

getLoadContext

public LoadContexts getLoadContext()

getLoadingCollection

public PersistentCollection getLoadingCollection(CollectionPersister persister,
                                                 Serializable key)
Retrieve the collection that is being loaded as part of processing this result set.

Basically, there are two valid return values from this method:

Parameters:
persister - The persister for the collection being requested.
key - The key of the collection being requested.
Returns:
The loading collection (see discussion above).

endLoadingCollections

public void endLoadingCollections(CollectionPersister persister)
Finish the process of collection-loading for this bound result set. Mainly this involves cleaning up resources and notifying the collections that loading is complete.

Parameters:
persister - The persister for which to complete loading.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.