Class AbstractNonAggregatedIdentifierMappingInitializer
- java.lang.Object
-
- org.hibernate.sql.results.graph.AbstractFetchParentAccess
-
- org.hibernate.sql.results.graph.embeddable.internal.AbstractNonAggregatedIdentifierMappingInitializer
-
- All Implemented Interfaces:
ValueAccess
,EmbeddableInitializer
,FetchParentAccess
,Initializer
- Direct Known Subclasses:
NonAggregatedIdentifierMappingFetchInitializer
,NonAggregatedIdentifierMappingResultInitializer
public abstract class AbstractNonAggregatedIdentifierMappingInitializer extends AbstractFetchParentAccess implements EmbeddableInitializer, ValueAccess
-
-
Field Summary
Fields Modifier and Type Field Description protected Object
compositeInstance
-
Constructor Summary
Constructors Constructor Description AbstractNonAggregatedIdentifierMappingInitializer(EmbeddableResultGraphNode resultDescriptor, FetchParentAccess fetchParentAccess, AssemblerCreationState creationState)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static DomainResultAssembler<?>[]
createAssemblers(FetchParentAccess parentAccess, EmbeddableResultGraphNode resultDescriptor, AssemblerCreationState creationState, EmbeddableMappingType embeddableTypeDescriptor)
FetchParentAccess
findFirstEntityDescriptorAccess()
Find the first entity access up the fetch parent graphEntityInitializer
findFirstEntityInitializer()
void
finishUpRow(RowProcessingState rowProcessingState)
Lifecycle method called at the end of the current row processing.Object
getCompositeInstance()
FetchParentAccess
getFetchParentAccess()
EmbeddableValuedModelPart
getInitializedPart()
NavigablePath
getNavigablePath()
Object
getOwner()
Access to the owner of the instance being instantiated<T> T
getValue(int i, Class<T> clazz)
Access to an individual value.Object[]
getValues()
The complete set of values.void
initializeInstance(RowProcessingState processingState)
Step 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(org.hibernate.sql.results.jdbc.spi.RowProcessingState)
from the current row values.void
resolveInstance(RowProcessingState processingState)
Step 2 - Using the key resolved inInitializer.resolveKey(org.hibernate.sql.results.jdbc.spi.RowProcessingState)
, resolve the instance (of the thing initialized) to use for the current row.void
resolveKey(RowProcessingState processingState)
Step 1 - Resolve the key value for this initializer for the current row.void
resolveState(RowProcessingState rowProcessingState)
String
toString()
-
Methods inherited from class org.hibernate.sql.results.graph.AbstractFetchParentAccess
clearResolutionListeners, notifyResolutionListeners, registerResolutionListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableInitializer
asEmbeddableInitializer, getInitializedInstance, isEmbeddableInitializer, wrapProcessingState
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchParentAccess
getParentKey, registerResolutionListener
-
Methods inherited from interface org.hibernate.sql.results.graph.Initializer
asEntityInitializer, endLoading, isAttributeAssignableToConcreteDescriptor, isCollectionInitializer, isEntityInitializer
-
-
-
-
Field Detail
-
compositeInstance
protected Object compositeInstance
-
-
Constructor Detail
-
AbstractNonAggregatedIdentifierMappingInitializer
public AbstractNonAggregatedIdentifierMappingInitializer(EmbeddableResultGraphNode resultDescriptor, FetchParentAccess fetchParentAccess, AssemblerCreationState creationState)
-
-
Method Detail
-
createAssemblers
protected static DomainResultAssembler<?>[] createAssemblers(FetchParentAccess parentAccess, EmbeddableResultGraphNode resultDescriptor, AssemblerCreationState creationState, EmbeddableMappingType embeddableTypeDescriptor)
-
getInitializedPart
public EmbeddableValuedModelPart getInitializedPart()
- Specified by:
getInitializedPart
in interfaceEmbeddableInitializer
- Specified by:
getInitializedPart
in interfaceInitializer
-
getFetchParentAccess
public FetchParentAccess getFetchParentAccess()
- Specified by:
getFetchParentAccess
in interfaceEmbeddableInitializer
- Specified by:
getFetchParentAccess
in interfaceFetchParentAccess
-
getNavigablePath
public NavigablePath getNavigablePath()
- Specified by:
getNavigablePath
in interfaceFetchParentAccess
- Specified by:
getNavigablePath
in interfaceInitializer
-
getCompositeInstance
public Object getCompositeInstance()
- Specified by:
getCompositeInstance
in interfaceEmbeddableInitializer
-
findFirstEntityDescriptorAccess
public FetchParentAccess findFirstEntityDescriptorAccess()
Description copied from interface:FetchParentAccess
Find the first entity access up the fetch parent graph- Specified by:
findFirstEntityDescriptorAccess
in interfaceFetchParentAccess
-
findFirstEntityInitializer
public EntityInitializer findFirstEntityInitializer()
- Specified by:
findFirstEntityInitializer
in interfaceFetchParentAccess
-
resolveKey
public void resolveKey(RowProcessingState processingState)
Description copied from interface:Initializer
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- Specified by:
resolveKey
in interfaceInitializer
-
resolveInstance
public void resolveInstance(RowProcessingState processingState)
Description copied from interface:Initializer
Step 2 - Using the key resolved inInitializer.resolveKey(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..- Specified by:
resolveInstance
in interfaceInitializer
-
initializeInstance
public void initializeInstance(RowProcessingState processingState)
Description copied from interface:Initializer
Step 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(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- Specified by:
initializeInstance
in interfaceInitializer
-
resolveState
public void resolveState(RowProcessingState rowProcessingState)
- Specified by:
resolveState
in interfaceEmbeddableInitializer
-
getValues
public Object[] getValues()
Description copied from interface:ValueAccess
The complete set of values.- Specified by:
getValues
in interfaceValueAccess
-
getValue
public <T> T getValue(int i, Class<T> clazz)
Description copied from interface:ValueAccess
Access to an individual value.- Specified by:
getValue
in interfaceValueAccess
-
getOwner
public Object getOwner()
Description copied from interface:ValueAccess
Access to the owner of the instance being instantiated- Specified by:
getOwner
in interfaceValueAccess
-
finishUpRow
public void finishUpRow(RowProcessingState rowProcessingState)
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
-
-