Class AbstractBatchEntitySelectFetchInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>
- All Implemented Interfaces:
EntityInitializer<Data>,Initializer<Data>,InitializerParent<Data>
- Direct Known Subclasses:
BatchEntityInsideEmbeddableSelectFetchInitializer,BatchEntitySelectFetchInitializer,BatchInitializeEntitySelectFetchInitializer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class org.hibernate.sql.results.graph.entity.internal.EntitySelectFetchInitializer
EntitySelectFetchInitializer.EntitySelectFetchInitializerDataNested classes/interfaces inherited from interface org.hibernate.sql.results.graph.Initializer
Initializer.State -
Field Summary
FieldsFields inherited from class org.hibernate.sql.results.graph.entity.internal.EntitySelectFetchInitializer
affectedByFilter, concreteDescriptor, hasLazySubInitializer, keyAssembler, keyIsEager, parent, toOneMappingFields inherited from class org.hibernate.sql.results.graph.internal.AbstractInitializer
initializerIdFields inherited from interface org.hibernate.sql.results.graph.Initializer
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBatchEntitySelectFetchInitializer(InitializerParent<?> parent, ToOneAttributeMapping toOneMapping, NavigablePath fetchedNavigable, EntityPersister concreteDescriptor, DomainResult<?> keyResult, boolean affectedByFilter, AssemblerCreationState creationState) -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectprotected static AttributeMappinggetParentEntityAttribute(EntityMappingType subMappingType, ToOneAttributeMapping referencedModelPart, String attributeName) protected AttributeMapping[]getParentEntityAttributes(String attributeName) voidinitializeInstance(Data data) Step 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(Data)from the current row values.voidinitializeInstanceFromParent(Object parentInstance, Data data) Step 3.1 - Initialize the state of the instance as extracted from the givenparentInstance.protected static ObjectloadInstance(EntityKey entityKey, ToOneAttributeMapping toOneMapping, boolean affectedByFilter, SharedSessionContractImplementor session) protected abstract voidprotected voidvoidresolveInstance(Data data) Step 2.1 - Using the key resolved inInitializer.resolveKey(Data), resolve the instance (of the thing initialized) to use for the current row.voidresolveInstance(Object instance, Data data) Step 2.2 - Use the given instance as resolved instance for this initializer.protected voidvoidresolveKey(Data data) Step 1.1 - Resolve the key value for this initializer for the current row and then recurse to the sub-initializers.Methods inherited from class org.hibernate.sql.results.graph.entity.internal.EntitySelectFetchInitializer
createInitializerData, forEachSubInitializer, getConcreteDescriptor, getEntityDescriptor, getEntityIdentifier, getInitializedPart, getKeyAssembler, getNavigablePath, getParent, hasLazySubInitializers, initialize, isEager, isPartOfKey, isResultInitializer, resolveFromPreviousRow, resolveState, toStringMethods inherited from class org.hibernate.sql.results.graph.internal.AbstractInitializer
finishUpRow, getData, startLoadingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.sql.results.graph.entity.EntityInitializer
asEntityInitializer, getConcreteDescriptor, getConcreteDescriptor, getEntityDescriptor, getEntityIdentifier, getEntityIdentifier, getTargetInstance, getTargetInstance, isEntityInitializer, resetResolvedEntityRegistrations, resolveEntityKeyOnlyMethods inherited from interface org.hibernate.sql.results.graph.Initializer
asCollectionInitializer, asEmbeddableInitializer, endLoading, findOwningEntityInitializer, finishUpRow, getData, getInitializedPart, getNavigablePath, getParent, getResolvedInstance, getResolvedInstance, hasLazySubInitializers, initializeInstance, initializeInstanceFromParent, isCollectionInitializer, isEager, isEmbeddableInitializer, isLazyCapable, isPartOfKey, isResultInitializer, resolveFromPreviousRow, resolveFromPreviousRow, resolveInstance, resolveInstance, resolveKey, resolveState, resolveState, startLoading
-
Field Details
-
owningEntityInitializer
-
-
Constructor Details
-
Method Details
-
registerResolutionListener
-
resolveKey
Description copied from interface:InitializerStep 1.1 - Resolve the key value for this initializer for the current row and then recurse to the sub-initializers.After this point, the initializer knows whether further processing is necessary for the current row i.e. if the object is missing.
- Specified by:
resolveKeyin interfaceInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>- Overrides:
resolveKeyin classAbstractInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>
-
resolveInstance
Description copied from interface:InitializerStep 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.- Specified by:
resolveInstancein interfaceInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>- Overrides:
resolveInstancein classEntitySelectFetchInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>
-
resolveInstanceFromIdentifier
-
resolveInstance
Description copied from interface:InitializerStep 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.
- Specified by:
resolveInstancein interfaceInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>- Overrides:
resolveInstancein classEntitySelectFetchInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>
-
initializeInstance
Description copied from interface:InitializerStep 3 - Initialize the state of the instance resolved inInitializer.resolveInstance(Data)from the current row values.All resolved state for the current row is injected into the resolved instance
- Specified by:
initializeInstancein interfaceInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>- Overrides:
initializeInstancein classEntitySelectFetchInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>
-
getExistingInitializedInstance
-
registerToBatchFetchQueue
-
initializeInstanceFromParent
Description copied from interface:InitializerStep 3.1 - Initialize the state of the instance as extracted from the givenparentInstance. 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 the
JdbcValuesCacheHitto initialize potentially lazy associations.- Specified by:
initializeInstanceFromParentin interfaceInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>- Overrides:
initializeInstanceFromParentin classEntitySelectFetchInitializer<Data extends AbstractBatchEntitySelectFetchInitializer.AbstractBatchEntitySelectFetchInitializerData>
-
getParentEntityAttributes
-
getParentEntityAttribute
protected static AttributeMapping getParentEntityAttribute(EntityMappingType subMappingType, ToOneAttributeMapping referencedModelPart, String attributeName)
-