Interface EntityInitializer<Data extends InitializerData>
-
- All Superinterfaces:
Initializer<Data>
,InitializerParent<Data>
- All Known Implementing Classes:
AbstractBatchEntitySelectFetchInitializer
,BatchEntityInsideEmbeddableSelectFetchInitializer
,BatchEntitySelectFetchInitializer
,BatchInitializeEntitySelectFetchInitializer
,DiscriminatedEntityInitializer
,EntityDelayedFetchInitializer
,EntityInitializerImpl
,EntitySelectFetchByUniqueKeyInitializer
,EntitySelectFetchInitializer
public interface EntityInitializer<Data extends InitializerData> extends InitializerParent<Data>
Initializer implementation for initializing entity references.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.sql.results.graph.Initializer
Initializer.State
-
-
Field Summary
-
Fields inherited from interface org.hibernate.sql.results.graph.Initializer
EMPTY_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default EntityInitializer<?>
asEntityInitializer()
A utility method to avoid casting explicitly to EntityInitializerEntityPersister
getConcreteDescriptor(Data data)
default EntityPersister
getConcreteDescriptor(RowProcessingState rowProcessingState)
EntityPersister
getEntityDescriptor()
Get the descriptor for the type of entity being initialized@Nullable Object
getEntityIdentifier(Data data)
default @Nullable Object
getEntityIdentifier(RowProcessingState rowProcessingState)
default Object
getTargetInstance(Data data)
Get the target entity instance for the currently processing "row".default Object
getTargetInstance(RowProcessingState rowProcessingState)
default boolean
isEntityInitializer()
default void
resetResolvedEntityRegistrations(RowProcessingState rowProcessingState)
Resets the resolved entity registrations by i.e.default @Nullable EntityKey
resolveEntityKeyOnly(RowProcessingState rowProcessingState)
-
Methods inherited from interface org.hibernate.sql.results.graph.Initializer
asCollectionInitializer, asEmbeddableInitializer, endLoading, endLoading, findOwningEntityInitializer, finishUpRow, finishUpRow, getData, getInitializedPart, getNavigablePath, getParent, getResolvedInstance, getResolvedInstance, hasLazySubInitializers, initializeInstance, initializeInstance, initializeInstanceFromParent, initializeInstanceFromParent, isCollectionInitializer, isEager, isEmbeddableInitializer, isLazyCapable, isPartOfKey, isResultInitializer, resolveFromPreviousRow, resolveFromPreviousRow, resolveInstance, resolveInstance, resolveInstance, resolveInstance, resolveKey, resolveKey, resolveState, resolveState, startLoading
-
-
-
-
Method Detail
-
getEntityDescriptor
EntityPersister getEntityDescriptor()
Get the descriptor for the type of entity being initialized
-
getConcreteDescriptor
EntityPersister getConcreteDescriptor(Data data)
-
getConcreteDescriptor
default EntityPersister getConcreteDescriptor(RowProcessingState rowProcessingState)
-
getTargetInstance
default Object getTargetInstance(Data data)
Get the target entity instance for the currently processing "row".- API Note:
- Calling this method is only valid from the time
Initializer.resolveKey(InitializerData)
has been called untilInitializer.finishUpRow(InitializerData)
has been called for the currently processing row
-
getTargetInstance
default Object getTargetInstance(RowProcessingState rowProcessingState)
-
resolveEntityKeyOnly
default @Nullable EntityKey resolveEntityKeyOnly(RowProcessingState rowProcessingState)
-
getEntityIdentifier
default @Nullable Object getEntityIdentifier(RowProcessingState rowProcessingState)
-
resetResolvedEntityRegistrations
default void resetResolvedEntityRegistrations(RowProcessingState rowProcessingState)
Resets the resolved entity registrations by i.e. removingEntityHolder
.
-
isEntityInitializer
default boolean isEntityInitializer()
- Specified by:
isEntityInitializer
in interfaceInitializer<Data extends InitializerData>
-
asEntityInitializer
default EntityInitializer<?> asEntityInitializer()
Description copied from interface:Initializer
A utility method to avoid casting explicitly to EntityInitializer- Specified by:
asEntityInitializer
in interfaceInitializer<Data extends InitializerData>
- Returns:
- EntityInitializer if this is an instance of EntityInitializer otherwise
null
-
-