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 ObjectcompositeInstance
-
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)FetchParentAccessfindFirstEntityDescriptorAccess()Find the first entity access up the fetch parent graphEntityInitializerfindFirstEntityInitializer()voidfinishUpRow(RowProcessingState rowProcessingState)Lifecycle method called at the end of the current row processing.ObjectgetCompositeInstance()FetchParentAccessgetFetchParentAccess()EmbeddableValuedModelPartgetInitializedPart()NavigablePathgetNavigablePath()ObjectgetOwner()Access to the owner of the instance being instantiated<T> TgetValue(int i, Class<T> clazz)Access to an individual value.Object[]getValues()The complete set of values.voidinitializeInstance(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.voidresolveInstance(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.voidresolveKey(RowProcessingState processingState)Step 1 - Resolve the key value for this initializer for the current row.voidresolveState(RowProcessingState rowProcessingState)StringtoString()-
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:
getInitializedPartin interfaceEmbeddableInitializer- Specified by:
getInitializedPartin interfaceInitializer
-
getFetchParentAccess
public FetchParentAccess getFetchParentAccess()
- Specified by:
getFetchParentAccessin interfaceEmbeddableInitializer- Specified by:
getFetchParentAccessin interfaceFetchParentAccess
-
getNavigablePath
public NavigablePath getNavigablePath()
- Specified by:
getNavigablePathin interfaceFetchParentAccess- Specified by:
getNavigablePathin interfaceInitializer
-
getCompositeInstance
public Object getCompositeInstance()
- Specified by:
getCompositeInstancein interfaceEmbeddableInitializer
-
findFirstEntityDescriptorAccess
public FetchParentAccess findFirstEntityDescriptorAccess()
Description copied from interface:FetchParentAccessFind the first entity access up the fetch parent graph- Specified by:
findFirstEntityDescriptorAccessin interfaceFetchParentAccess
-
findFirstEntityInitializer
public EntityInitializer findFirstEntityInitializer()
- Specified by:
findFirstEntityInitializerin interfaceFetchParentAccess
-
resolveKey
public void resolveKey(RowProcessingState processingState)
Description copied from interface:InitializerStep 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:
resolveKeyin interfaceInitializer
-
resolveInstance
public void resolveInstance(RowProcessingState processingState)
Description copied from interface:InitializerStep 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:
resolveInstancein interfaceInitializer
-
initializeInstance
public void initializeInstance(RowProcessingState processingState)
Description copied from interface:InitializerStep 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:
initializeInstancein interfaceInitializer
-
resolveState
public void resolveState(RowProcessingState rowProcessingState)
- Specified by:
resolveStatein interfaceEmbeddableInitializer
-
getValues
public Object[] getValues()
Description copied from interface:ValueAccessThe complete set of values.- Specified by:
getValuesin interfaceValueAccess
-
getValue
public <T> T getValue(int i, Class<T> clazz)Description copied from interface:ValueAccessAccess to an individual value.- Specified by:
getValuein interfaceValueAccess
-
getOwner
public Object getOwner()
Description copied from interface:ValueAccessAccess to the owner of the instance being instantiated- Specified by:
getOwnerin interfaceValueAccess
-
finishUpRow
public void finishUpRow(RowProcessingState rowProcessingState)
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
-
-