Class EntityDelayedFetchInitializer
- java.lang.Object
-
- org.hibernate.sql.results.graph.internal.AbstractInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
- org.hibernate.sql.results.graph.entity.internal.EntityDelayedFetchInitializer
-
- All Implemented Interfaces:
EntityInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
,Initializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
,InitializerParent<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
public class EntityDelayedFetchInitializer extends AbstractInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData> implements EntityInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData
-
Nested classes/interfaces inherited from interface org.hibernate.sql.results.graph.Initializer
Initializer.State
-
-
Field Summary
-
Fields inherited from class org.hibernate.sql.results.graph.internal.AbstractInitializer
initializerId
-
Fields inherited from interface org.hibernate.sql.results.graph.Initializer
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description EntityDelayedFetchInitializer(InitializerParent<?> parent, NavigablePath fetchedNavigable, ToOneAttributeMapping referencedModelPart, boolean selectByUniqueKey, DomainResult<?> keyResult, @Nullable BasicFetch<?> discriminatorResult, AssemblerCreationState creationState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InitializerData
createInitializerData(RowProcessingState rowProcessingState)
protected void
forEachSubInitializer(BiConsumer<Initializer<?>,RowProcessingState> consumer, InitializerData data)
EntityPersister
getConcreteDescriptor(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
protected @Nullable BasicResultAssembler<?>
getDiscriminatorAssembler()
EntityPersister
getEntityDescriptor()
Get the descriptor for the type of entity being initialized@Nullable Object
getEntityIdentifier(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
protected DomainResultAssembler<?>
getIdentifierAssembler()
ModelPart
getInitializedPart()
NavigablePath
getNavigablePath()
@Nullable InitializerParent<?>
getParent()
Returns the parentInitializer
ornull
if this is a result initializer.boolean
hasLazySubInitializers()
Indicates whether this initializer has sub-initializers which are lazy.boolean
isEager()
Indicates whether calling resolve is needed when the object for this initializer is initialized already.boolean
isPartOfKey()
Indicates whether this initializer is part of a key i.e.boolean
isResultInitializer()
Indicates if this is a result or fetch initializer.protected boolean
isSelectByUniqueKey()
void
resolveFromPreviousRow(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
Step 1.2 - Special variant ofInitializer.resolveKey(InitializerData)
that allows the reuse of key value and instance value from the previous row.void
resolveInstance(Object instance, EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
Step 2.2 - Use the given instance as resolved instance for this initializer.void
resolveInstance(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
Step 2.1 - Using the key resolved inInitializer.resolveKey(Data)
, resolve the instance (of the thing initialized) to use for the current row.void
resolveState(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
String
toString()
-
Methods inherited from class org.hibernate.sql.results.graph.internal.AbstractInitializer
finishUpRow, getData, initializeInstance, resolveKey, startLoading
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.results.graph.entity.EntityInitializer
asEntityInitializer, getConcreteDescriptor, getEntityIdentifier, getTargetInstance, getTargetInstance, isEntityInitializer, resetResolvedEntityRegistrations, resolveEntityKeyOnly
-
Methods inherited from interface org.hibernate.sql.results.graph.Initializer
asCollectionInitializer, asEmbeddableInitializer, endLoading, endLoading, findOwningEntityInitializer, finishUpRow, finishUpRow, getData, getResolvedInstance, getResolvedInstance, initializeInstance, initializeInstance, initializeInstanceFromParent, initializeInstanceFromParent, isCollectionInitializer, isEmbeddableInitializer, isLazyCapable, resolveFromPreviousRow, resolveInstance, resolveInstance, resolveKey, resolveKey, resolveState, startLoading
-
-
-
-
Constructor Detail
-
EntityDelayedFetchInitializer
public EntityDelayedFetchInitializer(InitializerParent<?> parent, NavigablePath fetchedNavigable, ToOneAttributeMapping referencedModelPart, boolean selectByUniqueKey, DomainResult<?> keyResult, @Nullable BasicFetch<?> discriminatorResult, AssemblerCreationState creationState)
-
-
Method Detail
-
createInitializerData
protected InitializerData createInitializerData(RowProcessingState rowProcessingState)
- Specified by:
createInitializerData
in classAbstractInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
getNavigablePath
public NavigablePath getNavigablePath()
- Specified by:
getNavigablePath
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
getInitializedPart
public ModelPart getInitializedPart()
- Specified by:
getInitializedPart
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
resolveFromPreviousRow
public void resolveFromPreviousRow(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
Description copied from interface:Initializer
Step 1.2 - Special variant ofInitializer.resolveKey(InitializerData)
that allows the reuse of key value and instance value from the previous row.- Specified by:
resolveFromPreviousRow
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
resolveInstance
public void resolveInstance(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
Description copied from interface:Initializer
Step 2.1 - Using the key resolved inInitializer.resolveKey(Data)
, resolve the instance (of the thing initialized) to use for the current row. After this point, the initializer knows the entity/collection/component instance for the current row based on the resolved key. If the resolving was successful,Initializer.getResolvedInstance(RowProcessingState)
will return that instance.- Specified by:
resolveInstance
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
resolveInstance
public void resolveInstance(Object instance, EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
Description copied from interface:Initializer
Step 2.2 - Use the given instance as resolved instance for this initializer. Initializers are supposed to recursively call this method for sub-initializers. This alternative initialization protocol is used when a parent instance was already part of the persistence context.- Specified by:
resolveInstance
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
forEachSubInitializer
protected void forEachSubInitializer(BiConsumer<Initializer<?>,RowProcessingState> consumer, InitializerData data)
- Specified by:
forEachSubInitializer
in classAbstractInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
getEntityDescriptor
public EntityPersister getEntityDescriptor()
Description copied from interface:EntityInitializer
Get the descriptor for the type of entity being initialized- Specified by:
getEntityDescriptor
in interfaceEntityInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
getParent
public @Nullable InitializerParent<?> getParent()
Description copied from interface:Initializer
Returns the parentInitializer
ornull
if this is a result initializer.- Specified by:
getParent
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
isPartOfKey
public boolean isPartOfKey()
Description copied from interface:Initializer
Indicates whether this initializer is part of a key i.e. entity identifier, foreign key or collection key.- Specified by:
isPartOfKey
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
isEager
public boolean isEager()
Description copied from interface:Initializer
Indicates whether calling resolve is needed when the object for this initializer is initialized already.- Specified by:
isEager
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
hasLazySubInitializers
public boolean hasLazySubInitializers()
Description copied from interface:Initializer
Indicates whether this initializer has sub-initializers which are lazy.- Specified by:
hasLazySubInitializers
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
isResultInitializer
public boolean isResultInitializer()
Description copied from interface:Initializer
Indicates if this is a result or fetch initializer.- Specified by:
isResultInitializer
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
getConcreteDescriptor
public EntityPersister getConcreteDescriptor(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
- Specified by:
getConcreteDescriptor
in interfaceEntityInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
resolveState
public void resolveState(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
- Specified by:
resolveState
in interfaceInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
getEntityIdentifier
public @Nullable Object getEntityIdentifier(EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData data)
- Specified by:
getEntityIdentifier
in interfaceEntityInitializer<EntityDelayedFetchInitializer.EntityDelayedFetchInitializerData>
-
isSelectByUniqueKey
protected boolean isSelectByUniqueKey()
-
getIdentifierAssembler
protected DomainResultAssembler<?> getIdentifierAssembler()
-
getDiscriminatorAssembler
protected @Nullable BasicResultAssembler<?> getDiscriminatorAssembler()
-
-