类 CollectionLoadContext
- java.lang.Object
-
- org.hibernate.engine.loading.internal.CollectionLoadContext
-
public class CollectionLoadContext extends Object
Represents state associated with the processing of a givenResultSetin regards to loading collections. Another implementation option to consider is to not exposeResultSets directly (in the JDBC redesign) but to always "wrap" them and apply a [series of] context[s] to that wrapper.- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 CollectionLoadContext(LoadContexts loadContexts, ResultSet resultSet)Creates a collection load context for the given result set.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidendLoadingCollections(CollectionPersister persister)Finish the process of collection-loading for this bound result set.LoadContextsgetLoadContext()PersistentCollectiongetLoadingCollection(CollectionPersister persister, Serializable key)Retrieve the collection that is being loaded as part of processing this result set.ResultSetgetResultSet()StringtoString()
-
-
-
构造器详细资料
-
CollectionLoadContext
public CollectionLoadContext(LoadContexts loadContexts, ResultSet resultSet)
Creates a collection load context for the given result set.- 参数:
loadContexts- Callback to other collection load contexts.resultSet- The result set this is "wrapping".
-
-
方法详细资料
-
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:- an instance of
PersistentCollectionwhich indicates to continue loading the result set row data into that returned collection instance; this may be either an instance already associated and in the midst of being loaded, or a newly instantiated instance as a matching associated collection was not found. - null indicates to ignore the corresponding result set row data relating to the requested collection; this indicates that either the collection was found to already be associated with the persistence context in a fully loaded state, or it was found in a loading state associated with another result set processing context.
- 参数:
persister- The persister for the collection being requested.key- The key of the collection being requested.- 返回:
- The loading collection (see discussion above).
- an instance of
-
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.- 参数:
persister- The persister for which to complete loading.
-
-