Package org.hibernate.loader.entity
Class BatchingEntityLoader
java.lang.Object
org.hibernate.loader.entity.BatchingEntityLoader
- All Implemented Interfaces:
UniqueEntityLoader
"Batch" loads entities, using multiple primary key values in the
SQL where clause.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBatchingEntityLoader(EntityPersister persister, int[] batchSizes, Loader[] loaders) -
Method Summary
Modifier and TypeMethodDescriptionstatic UniqueEntityLoadercreateBatchingEntityLoader(OuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) static UniqueEntityLoadercreateBatchingEntityLoader(OuterJoinLoadable persister, int maxBatchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) load(Serializable id, Object optionalObject, SessionImplementor session) Load an entity instance.load(Serializable id, Object optionalObject, SessionImplementor session, LockOptions lockOptions) Load an entity instance by id.
-
Constructor Details
-
BatchingEntityLoader
-
-
Method Details
-
load
Load an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.- Specified by:
loadin interfaceUniqueEntityLoader
-
load
public Object load(Serializable id, Object optionalObject, SessionImplementor session, LockOptions lockOptions) Description copied from interface:UniqueEntityLoaderLoad an entity instance by id. If optionalObject is supplied (non-null, the entity state is loaded into that object instance instead of instantiating a new one.- Specified by:
loadin interfaceUniqueEntityLoader- Parameters:
id- The id to be loadedoptionalObject- The (optional) entity instance in to which to load the statesession- The session from which the request originatedlockOptions- The lock options.- Returns:
- The loaded entity
-
createBatchingEntityLoader
public static UniqueEntityLoader createBatchingEntityLoader(OuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException - Throws:
MappingException
-
createBatchingEntityLoader
public static UniqueEntityLoader createBatchingEntityLoader(OuterJoinLoadable persister, int maxBatchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException - Throws:
MappingException
-