Class DelayedCollectionInitializer
- 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.DelayedCollectionInitializer
-
- All Implemented Interfaces:
CollectionInitializer<AbstractCollectionInitializer.CollectionInitializerData>
,Initializer<AbstractCollectionInitializer.CollectionInitializerData>
,InitializerParent<AbstractCollectionInitializer.CollectionInitializerData>
public class DelayedCollectionInitializer 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 DelayedCollectionInitializer(NavigablePath fetchedPath, PluralAttributeMapping fetchedMapping, InitializerParent<?> parent, DomainResult<?> collectionKeyResult, AssemblerCreationState creationState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasLazySubInitializers()
Indicates whether this initializer has sub-initializers which are lazy.boolean
isEager()
Indicates whether calling resolve is needed when the object for this initializer is initialized already.void
resolveInstance(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, 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, initializeInstanceFromParent, isEmbeddableInitializer, isEntityInitializer, isLazyCapable, resolveFromPreviousRow, resolveInstance, resolveInstance, resolveKey, resolveState, startLoading
-
-
-
-
Constructor Detail
-
DelayedCollectionInitializer
public DelayedCollectionInitializer(NavigablePath fetchedPath, PluralAttributeMapping fetchedMapping, InitializerParent<?> parent, 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(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.
-
isEager
public boolean isEager()
Description copied from interface:Initializer
Indicates whether calling resolve is needed when the object for this initializer is initialized already.- Specified by:
isEager
in interfaceInitializer<AbstractCollectionInitializer.CollectionInitializerData>
- Overrides:
isEager
in classAbstractCollectionInitializer<AbstractCollectionInitializer.CollectionInitializerData>
-
hasLazySubInitializers
public boolean hasLazySubInitializers()
Description copied from interface:Initializer
Indicates whether this initializer has sub-initializers which are lazy.- Specified by:
hasLazySubInitializers
in interfaceInitializer<AbstractCollectionInitializer.CollectionInitializerData>
- Overrides:
hasLazySubInitializers
in classAbstractCollectionInitializer<AbstractCollectionInitializer.CollectionInitializerData>
-
-