类 LoadContexts
- java.lang.Object
-
- org.hibernate.engine.loading.internal.LoadContexts
-
public class LoadContexts extends Object
Mapsresult-setsto specific contextual data related to processing that result set Considering the JDBC-redesign work, would further like this contextual info not mapped separately, but available based on the result set being processed. This would also allow maintaining a single mapping as we could reliably get notification of the result-set closing...- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 LoadContexts(PersistenceContext persistenceContext)Creates and binds this to the given persistence context.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcleanup()Release internal state associated with *all* result sets.voidcleanup(ResultSet resultSet)Release internal state associated with the given result set.CollectionLoadContextgetCollectionLoadContext(ResultSet resultSet)Get theCollectionLoadContextassociated with the givenResultSet, creating one if needed.EntityLoadContextgetEntityLoadContext(ResultSet resultSet)Currently unusedPersistenceContextgetPersistenceContext()Retrieves the persistence context to which this is bound.booleanhasLoadingCollectionEntries()Do we currently have any internal entries corresponding to loading collections?booleanhasRegisteredLoadingCollectionEntries()Do we currently have any registered internal entries corresponding to loading collections?PersistentCollectionlocateLoadingCollection(CollectionPersister persister, CollectionKey key)Attempt to locate the loading collection given the CollectionKey obtained from the owner's key.
-
-
-
构造器详细资料
-
LoadContexts
public LoadContexts(PersistenceContext persistenceContext)
Creates and binds this to the given persistence context.- 参数:
persistenceContext- The persistence context to which this will be bound.
-
-
方法详细资料
-
getPersistenceContext
public PersistenceContext getPersistenceContext()
Retrieves the persistence context to which this is bound.- 返回:
- The persistence context to which this is bound.
-
cleanup
public void cleanup(ResultSet resultSet)
Release internal state associated with the given result set. This should be called when we are done with processing said result set, ideally as the result set is being closed.- 参数:
resultSet- The result set for which it is ok to release associated resources.
-
cleanup
public void cleanup()
Release internal state associated with *all* result sets. This is intended as a "failsafe" process to make sure we get everything cleaned up and released.
-
hasLoadingCollectionEntries
public boolean hasLoadingCollectionEntries()
Do we currently have any internal entries corresponding to loading collections?- 返回:
- True if we currently hold state pertaining to loading collections; false otherwise.
-
hasRegisteredLoadingCollectionEntries
public boolean hasRegisteredLoadingCollectionEntries()
Do we currently have any registered internal entries corresponding to loading collections?- 返回:
- True if we currently hold state pertaining to a registered loading collections; false otherwise.
-
getCollectionLoadContext
public CollectionLoadContext getCollectionLoadContext(ResultSet resultSet)
Get theCollectionLoadContextassociated with the givenResultSet, creating one if needed.- 参数:
resultSet- The result set for which to retrieve the context.- 返回:
- The processing context.
-
locateLoadingCollection
public PersistentCollection locateLoadingCollection(CollectionPersister persister, CollectionKey key)
Attempt to locate the loading collection given the CollectionKey obtained from the owner's key. The lookup here occurs against all result-set contexts...- 参数:
persister- The collection persisterkey- The collection key- 返回:
- The loading collection, or null if not found.
-
getEntityLoadContext
public EntityLoadContext getEntityLoadContext(ResultSet resultSet)
Currently unused- 参数:
resultSet- The result set- 返回:
- The entity load context
-
-