Class AbstractMultiIdEntityLoader<T>
java.lang.Object
org.hibernate.loader.ast.internal.AbstractMultiIdEntityLoader<T>
- All Implemented Interfaces:
EntityLoader
,EntityMultiLoader<T>
,Loader
,MultiIdEntityLoader<T>
,MultiKeyLoader
- Direct Known Subclasses:
MultiIdEntityLoaderArrayParam
,MultiIdEntityLoaderStandard
public abstract class AbstractMultiIdEntityLoader<T>
extends Object
implements MultiIdEntityLoader<T>
Base support for
MultiIdEntityLoader
implementations.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMultiIdEntityLoader
(EntityMappingType entityDescriptor, SessionFactoryImplementor sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected EntityMappingType
protected JdbcSelectExecutor
protected JdbcServices
The value-mapping loaded by this loaderprotected SessionFactoryImplementor
protected SqlAstTranslatorFactory
protected abstract void
handleResults
(MultiIdLoadOptions loadOptions, EventSource session, List<Integer> elementPositionsLoadedByBatch, List<Object> result) load
(K[] ids, MultiIdLoadOptions loadOptions, EventSource session) Load multiple entities by id.protected abstract void
loadEntitiesById
(List<Object> idsInBatch, LockOptions lockOptions, MultiIdLoadOptions loadOptions, EventSource session) protected abstract void
loadEntitiesWithUnresolvedIds
(MultiIdLoadOptions loadOptions, LockOptions lockOptions, EventSource session, Object[] unresolvableIds, List<T> result) protected boolean
loadFromEnabledCaches
(MultiIdLoadOptions loadOptions, EventSource session, Object id, LockOptions lockOptions, EntityKey entityKey, List<Object> result, int i) protected static LockOptions
lockOptions
(MultiIdLoadOptions loadOptions) protected abstract int
maxBatchSize
(Object[] ids, MultiIdLoadOptions loadOptions) performOrderedMultiLoad
(Object[] ids, MultiIdLoadOptions loadOptions, EventSource session) protected final <R> Object[]
resolveInCaches
(Object[] ids, MultiIdLoadOptions loadOptions, LockOptions lockOptions, EventSource session, AbstractMultiIdEntityLoader.ResolutionConsumer<R> resolutionConsumer) protected final <R> Object[]
resolveInCachesIfEnabled
(Object[] ids, @NonNull MultiIdLoadOptions loadOptions, @NonNull LockOptions lockOptions, EventSource session, AbstractMultiIdEntityLoader.ResolutionConsumer<R> resolutionConsumer) unorderedMultiLoad
(Object[] ids, MultiIdLoadOptions loadOptions, LockOptions lockOptions, EventSource session)
-
Field Details
-
idArray
-
-
Constructor Details
-
AbstractMultiIdEntityLoader
public AbstractMultiIdEntityLoader(EntityMappingType entityDescriptor, SessionFactoryImplementor sessionFactory)
-
-
Method Details
-
getEntityDescriptor
-
getSessionFactory
-
getIdentifierMapping
-
getJdbcServices
-
getSqlAstTranslatorFactory
-
getJdbcSelectExecutor
-
getLoadable
Description copied from interface:Loader
The value-mapping loaded by this loader- Specified by:
getLoadable
in interfaceEntityLoader
- Specified by:
getLoadable
in interfaceLoader
-
load
Description copied from interface:MultiIdEntityLoader
Load multiple entities by id. The exact result depends on the passed options.- Specified by:
load
in interfaceMultiIdEntityLoader<T>
-
performOrderedMultiLoad
protected List<T> performOrderedMultiLoad(Object[] ids, MultiIdLoadOptions loadOptions, EventSource session) -
lockOptions
-
maxBatchSize
-
handleResults
protected abstract void handleResults(MultiIdLoadOptions loadOptions, EventSource session, List<Integer> elementPositionsLoadedByBatch, List<Object> result) -
loadEntitiesById
protected abstract void loadEntitiesById(List<Object> idsInBatch, LockOptions lockOptions, MultiIdLoadOptions loadOptions, EventSource session) -
loadFromEnabledCaches
protected boolean loadFromEnabledCaches(MultiIdLoadOptions loadOptions, EventSource session, Object id, LockOptions lockOptions, EntityKey entityKey, List<Object> result, int i) -
unorderedMultiLoad
protected List<T> unorderedMultiLoad(Object[] ids, MultiIdLoadOptions loadOptions, LockOptions lockOptions, EventSource session) -
loadEntitiesWithUnresolvedIds
protected abstract void loadEntitiesWithUnresolvedIds(MultiIdLoadOptions loadOptions, LockOptions lockOptions, EventSource session, Object[] unresolvableIds, List<T> result) -
resolveInCachesIfEnabled
protected final <R> Object[] resolveInCachesIfEnabled(Object[] ids, @NonNull MultiIdLoadOptions loadOptions, @NonNull LockOptions lockOptions, EventSource session, AbstractMultiIdEntityLoader.ResolutionConsumer<R> resolutionConsumer) -
resolveInCaches
protected final <R> Object[] resolveInCaches(Object[] ids, MultiIdLoadOptions loadOptions, LockOptions lockOptions, EventSource session, AbstractMultiIdEntityLoader.ResolutionConsumer<R> resolutionConsumer)
-