Top Description Methods
org.hibernate.sql.results.graph

public Interface Initializer

Known Direct Subinterfaces
org.hibernate.sql.results.graph.collection.CollectionInitializer, org.hibernate.sql.results.graph.FetchParentAccess
Annotations
@Incubating
Imports
org.hibernate.Incubating, org.hibernate.metamodel.mapping.AttributeMapping, .ModelPart, org.hibernate.persister.entity.EntityPersister, org.hibernate.sql.results.graph.embeddable.EmbeddableInitializer, org.hibernate.sql.results.graph.entity.EntityInitializer, org.hibernate.sql.results.jdbc.spi.RowProcessingState, org.hibernate.spi.NavigablePath, org.hibernate.sql.exec.spi.ExecutionContext

Defines a multi-step process for initializing entity, collection and composite state. Each step is performed on each initializer before starting the next step.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public default EmbeddableInitializer

Returns:

EmbeddableInitializer if this is an instance of EmbeddableInitializer otherwise null
asEmbeddableInitializer
()

A utility method to avoid casting explicitly to EmbeddableInitializer

public default EntityInitializer

Returns:

EntityInitializer if this is an instance of EntityInitializer otherwise null
asEntityInitializer
()

A utility method to avoid casting explicitly to EntityInitializer

public default void
endLoading(ExecutionContext context)

Lifecycle method called at the very end of the result values processing

public void
finishUpRow(RowProcessingState rowProcessingState)

Lifecycle method called at the end of the current row processing.

public Object
public ModelPart
public NavigablePath
public void
initializeInstance(RowProcessingState rowProcessingState)

Step 3 - Initialize the state of the instance resolved in resolveInstance from the current row values.

public default boolean
public default boolean
public default boolean
public default boolean
public void
resolveInstance(RowProcessingState rowProcessingState)

Step 2 - Using the key resolved in resolveKey, resolve the instance (of the thing initialized) to use for the current row.

public void
resolveKey(RowProcessingState rowProcessingState)

Step 1 - Resolve the key value for this initializer for the current row.

Method Detail

asEmbeddableInitializerback to summary
public default EmbeddableInitializer asEmbeddableInitializer()

A utility method to avoid casting explicitly to EmbeddableInitializer

Returns:EmbeddableInitializer

EmbeddableInitializer if this is an instance of EmbeddableInitializer otherwise null

asEntityInitializerback to summary
public default EntityInitializer asEntityInitializer()

A utility method to avoid casting explicitly to EntityInitializer

Returns:EntityInitializer

EntityInitializer if this is an instance of EntityInitializer otherwise null

endLoadingback to summary
public default void endLoading(ExecutionContext context)

Lifecycle method called at the very end of the result values processing

finishUpRowback to summary
public 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.

getInitializedInstanceback to summary
public Object getInitializedInstance()
getInitializedPartback to summary
public ModelPart getInitializedPart()
getNavigablePathback to summary
public NavigablePath getNavigablePath()
initializeInstanceback to summary
public void initializeInstance(RowProcessingState rowProcessingState)

Step 3 - Initialize the state of the instance resolved in resolveInstance from the current row values. All resolved state for the current row is injected into the resolved instance

isAttributeAssignableToConcreteDescriptorback to summary
public default boolean isAttributeAssignableToConcreteDescriptor(FetchParentAccess parentAccess, AttributeMapping referencedModelPart)
isCollectionInitializerback to summary
public default boolean isCollectionInitializer()
isEmbeddableInitializerback to summary
public default boolean isEmbeddableInitializer()
isEntityInitializerback to summary
public default boolean isEntityInitializer()
resolveInstanceback to summary
public void resolveInstance(RowProcessingState rowProcessingState)

Step 2 - Using the key resolved in resolveKey, 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..

resolveKeyback to summary
public 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