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
ConstructorsModifierConstructorDescriptionprotectedAbstractInitializer(AssemblerCreationState creationState) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InitializerDatacreateInitializerData(RowProcessingState rowProcessingState) voidfinishUpRow(Data data) Lifecycle method called at the end of the current row processing.protected abstract voidforEachSubInitializer(BiConsumer<Initializer<?>, RowProcessingState> consumer, InitializerData data) getData(RowProcessingState rowProcessingState) The current data of this initializer.voidinitializeInstance(Data data) Step 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(Data)from the current row values.voidresolveKey(Data data) Step 1.1 - Resolve the key value for this initializer for the current row and then recurse to the sub-initializers.voidstartLoading(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, waitMethods inherited from interface org.hibernate.sql.results.graph.Initializer
asCollectionInitializer, asEmbeddableInitializer, asEntityInitializer, endLoading, findOwningEntityInitializer, 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:InitializerStep 0 - Callback for initializers before the first row is read. It is the responsibility of this initializer to recurse to the sub-initializers and registerInitializerDatafor the initializer id viaRowProcessingState.setInitializerData(int, InitializerData).This is useful for e.g. preparing initializers in case of a cache hit.
- Specified by:
startLoadingin interfaceInitializer<Data extends InitializerData>
-
createInitializerData
-
resolveKey
Description copied from interface:InitializerStep 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:
resolveKeyin interfaceInitializer<Data extends InitializerData>
-
initializeInstance
Description copied from interface:InitializerStep 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:
initializeInstancein interfaceInitializer<Data extends InitializerData>
-
getData
Description copied from interface:InitializerThe current data of this initializer.- Specified by:
getDatain interfaceInitializer<Data extends InitializerData>
-
finishUpRow
Description copied from interface:InitializerLifecycle 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:
finishUpRowin interfaceInitializer<Data extends InitializerData>
-
forEachSubInitializer
protected abstract void forEachSubInitializer(BiConsumer<Initializer<?>, RowProcessingState> consumer, InitializerData data)
-