Class AbstractInitializer<Data extends InitializerData>
java.lang.Object
org.hibernate.sql.results.graph.internal.AbstractInitializer<Data>
- All Implemented Interfaces:
Initializer<Data>
- Direct Known Subclasses:
AbstractCollectionInitializer
,DiscriminatedEntityInitializer
,EmbeddableInitializerImpl
,EntityDelayedFetchInitializer
,EntityInitializerImpl
,EntitySelectFetchInitializer
,NonAggregatedIdentifierMappingInitializer
public abstract class AbstractInitializer<Data extends InitializerData>
extends Object
implements Initializer<Data>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.sql.results.graph.Initializer
Initializer.State
-
Field Summary
FieldsFields inherited from interface org.hibernate.sql.results.graph.Initializer
EMPTY_ARRAY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractInitializer
(AssemblerCreationState creationState) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InitializerData
createInitializerData
(RowProcessingState rowProcessingState) void
finishUpRow
(Data data) Lifecycle method called at the end of the current row processing.protected abstract void
forEachSubInitializer
(BiConsumer<Initializer<?>, RowProcessingState> consumer, InitializerData data) getData
(RowProcessingState rowProcessingState) The current data of this initializer.void
initializeInstance
(Data data) Step 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(Data)
from the current row values.void
resolveKey
(Data data) Step 1.1 - Resolve the key value for this initializer for the current row and then recurse to the sub-initializers.void
startLoading
(RowProcessingState rowProcessingState) Step 0 - Callback for initializers before the first row is read.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.sql.results.graph.Initializer
asCollectionInitializer, asEmbeddableInitializer, asEntityInitializer, endLoading, endLoading, findOwningEntityInitializer, finishUpRow, getInitializedPart, getNavigablePath, getParent, getResolvedInstance, getResolvedInstance, hasLazySubInitializers, initializeInstance, initializeInstanceFromParent, initializeInstanceFromParent, isCollectionInitializer, isEager, isEmbeddableInitializer, isEntityInitializer, isLazyCapable, isPartOfKey, isResultInitializer, resolveFromPreviousRow, resolveFromPreviousRow, resolveInstance, resolveInstance, resolveInstance, resolveInstance, resolveKey, resolveState, resolveState
-
Field Details
-
initializerId
protected final int initializerId
-
-
Constructor Details
-
AbstractInitializer
-
-
Method Details
-
startLoading
Description copied from interface:Initializer
Step 0 - Callback for initializers before the first row is read. It is the responsibility of this initializer to recurse to the sub-initializers and registerInitializerData
for the initializer id viaRowProcessingState.setInitializerData(int, InitializerData)
. This is useful for e.g. preparing initializers in case of a cache hit.- Specified by:
startLoading
in interfaceInitializer<Data extends InitializerData>
-
createInitializerData
-
resolveKey
Description copied from interface:Initializer
Step 1.1 - Resolve the key value for this initializer for the current row and then recurse to the sub-initializers. After this point, the initializer knows whether further processing is necessary for the current row i.e. if the object is missing.- Specified by:
resolveKey
in interfaceInitializer<Data extends InitializerData>
-
initializeInstance
Description copied from interface:Initializer
Step 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(Data)
from the current row values. All resolved state for the current row is injected into the resolved instance- Specified by:
initializeInstance
in interfaceInitializer<Data extends InitializerData>
-
getData
Description copied from interface:Initializer
The current data of this initializer.- Specified by:
getData
in interfaceInitializer<Data extends InitializerData>
-
finishUpRow
Description copied from interface:Initializer
Lifecycle method called at the end of the current row processing. Provides ability to complete processing from the current row and prepare for the next row.- Specified by:
finishUpRow
in interfaceInitializer<Data extends InitializerData>
-
forEachSubInitializer
protected abstract void forEachSubInitializer(BiConsumer<Initializer<?>, RowProcessingState> consumer, InitializerData data)
-