Package org.hibernate.loader.entity
Class BatchingEntityLoaderBuilder
- java.lang.Object
-
- org.hibernate.loader.entity.BatchingEntityLoaderBuilder
-
- Direct Known Subclasses:
AbstractBatchingEntityLoaderBuilder
,DynamicBatchingEntityLoaderBuilder
,LegacyBatchingEntityLoaderBuilder
public abstract class BatchingEntityLoaderBuilder extends Object
The contract for buildingUniqueEntityLoader
capable of performing batch-fetch loading. Intention is to build these instances, by first calling the staticgetBuilder(org.hibernate.engine.spi.SessionFactoryImplementor)
, and then calling the appropriatebuildLoader(org.hibernate.persister.entity.OuterJoinLoadable, int, org.hibernate.LockMode, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.engine.spi.LoadQueryInfluencers)
method.- See Also:
BatchFetchStyle
-
-
Constructor Summary
Constructors Constructor Description BatchingEntityLoaderBuilder()
-
Method Summary
-
-
-
Method Detail
-
getBuilder
public static BatchingEntityLoaderBuilder getBuilder(SessionFactoryImplementor factory)
-
buildLoader
public UniqueEntityLoader buildLoader(OuterJoinLoadable persister, int batchSize, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers influencers)
Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.- Parameters:
persister
- The entity persisterbatchSize
- The maximum number of ids to batch-fetch at oncelockMode
- The lock modefactory
- The SessionFactoryinfluencers
- Any influencers that should affect the built query- Returns:
- The loader.
-
buildNonBatchingLoader
protected UniqueEntityLoader buildNonBatchingLoader(OuterJoinLoadable persister, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers influencers)
-
buildBatchingLoader
protected abstract UniqueEntityLoader buildBatchingLoader(OuterJoinLoadable persister, int batchSize, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers influencers)
-
buildLoader
public UniqueEntityLoader buildLoader(OuterJoinLoadable persister, int batchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers influencers)
Builds a batch-fetch capable loader based on the given persister, lock-options, etc.- Parameters:
persister
- The entity persisterbatchSize
- The maximum number of ids to batch-fetch at oncelockOptions
- The lock optionsfactory
- The SessionFactoryinfluencers
- Any influencers that should affect the built query- Returns:
- The loader.
-
buildNonBatchingLoader
protected UniqueEntityLoader buildNonBatchingLoader(OuterJoinLoadable persister, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers influencers)
-
buildBatchingLoader
protected abstract UniqueEntityLoader buildBatchingLoader(OuterJoinLoadable persister, int batchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers influencers)
-
-