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
Fields Modifier and Type Field Description protected intinitializerId-
Fields inherited from interface org.hibernate.sql.results.graph.Initializer
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractInitializer(AssemblerCreationState creationState)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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)DatagetData(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, 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
-
-
-
-
Constructor Detail
-
AbstractInitializer
protected AbstractInitializer(AssemblerCreationState creationState)
-
-
Method Detail
-
startLoading
public void startLoading(RowProcessingState rowProcessingState)
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
protected abstract InitializerData createInitializerData(RowProcessingState rowProcessingState)
-
resolveKey
public void resolveKey(Data data)
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
public void initializeInstance(Data data)
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
public Data getData(RowProcessingState rowProcessingState)
Description copied from interface:InitializerThe current data of this initializer.- Specified by:
getDatain interfaceInitializer<Data extends InitializerData>
-
finishUpRow
public void finishUpRow(Data data)
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)
-
-