Class EntityBatchLoaderArrayParam<T>
- java.lang.Object
-
- org.hibernate.loader.ast.internal.SingleIdEntityLoaderSupport<T>
-
- org.hibernate.loader.ast.internal.AbstractEntityBatchLoader<T>
-
- org.hibernate.loader.ast.internal.EntityBatchLoaderArrayParam<T>
-
- All Implemented Interfaces:
BatchLoader,EntityBatchLoader<T>,EntityLoader,Loader,MultiKeyLoader,SingleEntityLoader<T>,SingleIdEntityLoader<T>,SqlArrayMultiKeyLoader
public class EntityBatchLoaderArrayParam<T> extends AbstractEntityBatchLoader<T> implements SqlArrayMultiKeyLoader
SingleIdEntityLoaderSupportimplementation based on using a single array parameter to pass the entire batch of ids.
-
-
Field Summary
-
Fields inherited from class org.hibernate.loader.ast.internal.SingleIdEntityLoaderSupport
sessionFactory
-
-
Constructor Summary
Constructors Constructor Description EntityBatchLoaderArrayParam(int domainBatchSize, EntityMappingType entityDescriptor, LoadQueryInfluencers loadQueryInfluencers)Instantiates the loader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDomainBatchSize()The total number of loadable references that can be initialized per each load operation.protected voidinitializeEntities(Object[] idsToInitialize, Object id, Object entityInstance, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session)Tload(Object pkValue, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session)Load by primary key valueprotected Object[]resolveIdsToInitialize(Object pkValue, SharedSessionContractImplementor session)StringtoString()-
Methods inherited from class org.hibernate.loader.ast.internal.AbstractEntityBatchLoader
load, load
-
Methods inherited from class org.hibernate.loader.ast.internal.SingleIdEntityLoaderSupport
getLoadable, loadDatabaseSnapshot
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.loader.ast.spi.SingleEntityLoader
getLoadable
-
Methods inherited from interface org.hibernate.loader.ast.spi.SingleIdEntityLoader
loadDatabaseSnapshot
-
-
-
-
Constructor Detail
-
EntityBatchLoaderArrayParam
public EntityBatchLoaderArrayParam(int domainBatchSize, EntityMappingType entityDescriptor, LoadQueryInfluencers loadQueryInfluencers)Instantiates the loader- Parameters:
domainBatchSize- The number of domain model parts (up to)- Implementation Note:
- We delay initializing the internal SQL AST state until first use. Creating
the SQL AST internally relies on the entity's
EntityIdentifierMapping. However, we do create the static batch-loader for the entity in the persister constructor andEntityIdentifierMappingis not available at that time. On first use, we know we have it available
-
-
Method Detail
-
getDomainBatchSize
public int getDomainBatchSize()
Description copied from interface:BatchLoaderThe total number of loadable references that can be initialized per each load operation.- Specified by:
getDomainBatchSizein interfaceBatchLoader
-
resolveIdsToInitialize
protected Object[] resolveIdsToInitialize(Object pkValue, SharedSessionContractImplementor session)
- Specified by:
resolveIdsToInitializein classAbstractEntityBatchLoader<T>
-
initializeEntities
protected void initializeEntities(Object[] idsToInitialize, Object id, Object entityInstance, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session)
- Specified by:
initializeEntitiesin classAbstractEntityBatchLoader<T>
-
load
public T load(Object pkValue, LockOptions lockOptions, Boolean readOnly, SharedSessionContractImplementor session)
Description copied from interface:SingleIdEntityLoaderLoad by primary key value- Specified by:
loadin interfaceSingleEntityLoader<T>- Specified by:
loadin interfaceSingleIdEntityLoader<T>
-
-