Class SelectEagerCollectionInitializer
- java.lang.Object
-
- org.hibernate.sql.results.graph.internal.AbstractInitializer<Data>
-
- org.hibernate.sql.results.graph.collection.internal.AbstractCollectionInitializer<Data>
-
- org.hibernate.sql.results.graph.collection.internal.AbstractNonJoinCollectionInitializer<AbstractCollectionInitializer.CollectionInitializerData>
-
- org.hibernate.sql.results.graph.collection.internal.SelectEagerCollectionInitializer
-
- All Implemented Interfaces:
CollectionInitializer<AbstractCollectionInitializer.CollectionInitializerData>
,Initializer<AbstractCollectionInitializer.CollectionInitializerData>
,InitializerParent<AbstractCollectionInitializer.CollectionInitializerData>
public class SelectEagerCollectionInitializer extends AbstractNonJoinCollectionInitializer<AbstractCollectionInitializer.CollectionInitializerData>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.sql.results.graph.collection.internal.AbstractCollectionInitializer
AbstractCollectionInitializer.CollectionInitializerData
-
Nested classes/interfaces inherited from interface org.hibernate.sql.results.graph.Initializer
Initializer.State
-
-
Field Summary
-
Fields inherited from class org.hibernate.sql.results.graph.collection.internal.AbstractCollectionInitializer
collectionAttributeMapping, collectionKeyResultAssembler, collectionPath, isResultInitializer, keyTypeForEqualsHashCode, owningEntityInitializer, parent
-
Fields inherited from class org.hibernate.sql.results.graph.internal.AbstractInitializer
initializerId
-
Fields inherited from interface org.hibernate.sql.results.graph.Initializer
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description SelectEagerCollectionInitializer(NavigablePath fetchedPath, PluralAttributeMapping fetchedMapping, InitializerParent<?> parent, @Nullable DomainResult<?> collectionKeyResult, AssemblerCreationState creationState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initializeInstanceFromParent(Object parentInstance, AbstractCollectionInitializer.CollectionInitializerData data)
Step 3.1 - Initialize the state of the instance as extracted from the given parentInstance.void
resolveInstance(@Nullable Object instance, AbstractCollectionInitializer.CollectionInitializerData data)
Step 2.2 - Use the given instance as resolved instance for this initializer.void
resolveInstance(AbstractCollectionInitializer.CollectionInitializerData data)
Step 2.1 - Using the key resolved inInitializer.resolveKey(Data)
, resolve the instance (of the thing initialized) to use for the current row.String
toString()
-
Methods inherited from class org.hibernate.sql.results.graph.collection.internal.AbstractNonJoinCollectionInitializer
resolveInstance, resolveInstance
-
Methods inherited from class org.hibernate.sql.results.graph.collection.internal.AbstractCollectionInitializer
createInitializerData, forEachSubInitializer, getCollectionAttributeMapping, getCollectionInstance, getInitializedPart, getNavigablePath, getParent, hasLazySubInitializers, isEager, isPartOfKey, isResultInitializer, resolveCollectionKey, resolveFromPreviousRow, resolveKey, resolveState, setMissing
-
Methods inherited from class org.hibernate.sql.results.graph.internal.AbstractInitializer
finishUpRow, getData, initializeInstance, startLoading
-
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.collection.CollectionInitializer
asCollectionInitializer, getCollectionInstance, getInitializingCollectionDescriptor, isCollectionInitializer
-
Methods inherited from interface org.hibernate.sql.results.graph.Initializer
asEmbeddableInitializer, asEntityInitializer, endLoading, endLoading, findOwningEntityInitializer, finishUpRow, finishUpRow, getData, getResolvedInstance, getResolvedInstance, initializeInstance, initializeInstance, initializeInstanceFromParent, isEmbeddableInitializer, isEntityInitializer, isLazyCapable, resolveFromPreviousRow, resolveInstance, resolveInstance, resolveKey, resolveState, startLoading
-
-
-
-
Constructor Detail
-
SelectEagerCollectionInitializer
public SelectEagerCollectionInitializer(NavigablePath fetchedPath, PluralAttributeMapping fetchedMapping, InitializerParent<?> parent, @Nullable DomainResult<?> collectionKeyResult, AssemblerCreationState creationState)
-
-
Method Detail
-
resolveInstance
public void resolveInstance(AbstractCollectionInitializer.CollectionInitializerData data)
Description copied from interface:Initializer
Step 2.1 - Using the key resolved inInitializer.resolveKey(Data)
, 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. If the resolving was successful,Initializer.getResolvedInstance(RowProcessingState)
will return that instance.
-
resolveInstance
public void resolveInstance(@Nullable Object instance, AbstractCollectionInitializer.CollectionInitializerData data)
Description copied from interface:Initializer
Step 2.2 - Use the given instance as resolved instance for this initializer. Initializers are supposed to recursively call this method for sub-initializers. This alternative initialization protocol is used when a parent instance was already part of the persistence context.
-
initializeInstanceFromParent
public void initializeInstanceFromParent(Object parentInstance, AbstractCollectionInitializer.CollectionInitializerData data)
Description copied from interface:Initializer
Step 3.1 - Initialize the state of the instance as extracted from the given parentInstance. Extraction can be done with theInitializer.getInitializedPart()
. Initializers are supposed to recursively call this method for sub-initializers. This alternative initialization protocol is used for shallow query cache hits, in which case there is no data available in theJdbcValuesCacheHit
to initialize potentially lazy associations.
-
-