Package org.hibernate.sql.results.graph
Interface Initializer
-
- All Known Subinterfaces:
CollectionInitializer,EmbeddableInitializer,EntityInitializer,FetchParentAccess
- All Known Implementing Classes:
AbstractEmbeddableInitializer,AbstractEntityInitializer,AbstractFetchParentAccess
public interface InitializerDefines a multi-step process for initializing entity, collection and composite state. Each step is performed on each initializer before starting the next step.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidendLoading(ExecutionContext context)Lifecycle method called at the very end of the result values processingvoidfinishUpRow(RowProcessingState rowProcessingState)Lifecycle method called at the end of the current row processing.ObjectgetInitializedInstance()ModelPartgetInitializedPart()NavigablePathgetNavigablePath()voidinitializeInstance(RowProcessingState rowProcessingState)Step 3 - Initialize the state of the instance resolved inresolveInstance(org.hibernate.sql.results.jdbc.spi.RowProcessingState)from the current row values.voidresolveInstance(RowProcessingState rowProcessingState)Step 2 - Using the key resolved inresolveKey(org.hibernate.sql.results.jdbc.spi.RowProcessingState), resolve the instance (of the thing initialized) to use for the current row.voidresolveKey(RowProcessingState rowProcessingState)Step 1 - Resolve the key value for this initializer for the current row.
-
-
-
Method Detail
-
getNavigablePath
NavigablePath getNavigablePath()
-
getInitializedPart
ModelPart getInitializedPart()
-
getInitializedInstance
Object getInitializedInstance()
-
resolveKey
void resolveKey(RowProcessingState rowProcessingState)
Step 1 - Resolve the key value for this initializer for the current row. After this point, the initializer knows the entity/collection/component key for the current row
-
resolveInstance
void resolveInstance(RowProcessingState rowProcessingState)
Step 2 - Using the key resolved inresolveKey(org.hibernate.sql.results.jdbc.spi.RowProcessingState), 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 todo (6.0) : much of the various implementations of this are similar enough to handle in a common base implementation (templating?) things like resolving as managed (Session cache), from second-level cache, from LoadContext, etc..
-
initializeInstance
void initializeInstance(RowProcessingState rowProcessingState)
Step 3 - Initialize the state of the instance resolved inresolveInstance(org.hibernate.sql.results.jdbc.spi.RowProcessingState)from the current row values. All resolved state for the current row is injected into the resolved instance
-
finishUpRow
void finishUpRow(RowProcessingState rowProcessingState)
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.
-
endLoading
default void endLoading(ExecutionContext context)
Lifecycle method called at the very end of the result values processing
-
-