Class AggregateEmbeddableFetchImpl
java.lang.Object
org.hibernate.sql.results.graph.AbstractFetchParent
org.hibernate.sql.results.graph.embeddable.internal.AggregateEmbeddableFetchImpl
- All Implemented Interfaces:
DomainResultGraphNode
,AggregateEmbeddableResultGraphNode
,EmbeddableResultGraphNode
,Fetch
,FetchParent
,InitializerProducer<AggregateEmbeddableFetchImpl>
public class AggregateEmbeddableFetchImpl
extends AbstractFetchParent
implements AggregateEmbeddableResultGraphNode, Fetch, InitializerProducer<AggregateEmbeddableFetchImpl>
A Fetch for an embeddable that is mapped as aggregate e.g. STRUCT, JSON or XML.
This is only used when
EmbeddableMappingType.shouldSelectAggregateMapping()
returns true
.
The main difference is that it selects only the aggregate column and
uses DomainResultCreationState.visitNestedFetches(FetchParent)
for creating the fetches for the attributes of the embeddable.-
Constructor Summary
ConstructorsConstructorDescriptionAggregateEmbeddableFetchImpl
(NavigablePath navigablePath, EmbeddableValuedFetchable embeddedPartDescriptor, FetchParent fetchParent, FetchTiming fetchTiming, boolean hasTableGroup, DomainResultCreationState creationState) -
Method Summary
Modifier and TypeMethodDescriptionUtility method to avoidinstanceof
checks.createAssembler
(InitializerParent<?> parent, AssemblerCreationState creationState) Create the assembler for this fetchcreateInitializer
(AggregateEmbeddableFetchImpl resultGraphNode, InitializerParent<?> parent, AssemblerCreationState creationState) createInitializer
(InitializerParent<?> parent, AssemblerCreationState creationState) int[]
Returns the positions within the values array of the respective nesting level at which the data for this aggregate can be found.The value mapping being fetchedObtain the owner of this fetch.This parent's mapping typeThis parent's mapping typeimmediate or delayed? todo (6.0) : should we also expose the fetch-style? Perhaps the fetch-options?boolean
Is the TableGroup associated with this Fetch defined?resolveNavigablePath
(Fetchable fetchable) Methods inherited from class org.hibernate.sql.results.graph.AbstractFetchParent
afterInitialize, collectValueIndexesToCache, containsCollectionFetches, findFetch, getFetches, getNavigablePath, getResultJavaType, hasJoinFetches, resetFetches
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.sql.results.graph.DomainResultGraphNode
appliesTo, getResultJavaType
Methods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableResultGraphNode
getNavigablePath
Methods inherited from interface org.hibernate.sql.results.graph.Fetch
containsAnyNonScalarResults, getNavigablePath
Methods inherited from interface org.hibernate.sql.results.graph.FetchParent
collectValueIndexesToCache, containsCollectionFetches, findFetch, generateFetchableFetch, getCollectionFetchesCount, getFetches, getReferencedModePart, getRoot, hasJoinFetches
-
Constructor Details
-
Method Details
-
getAggregateValuesArrayPositions
public int[] getAggregateValuesArrayPositions()Description copied from interface:AggregateEmbeddableResultGraphNode
Returns the positions within the values array of the respective nesting level at which the data for this aggregate can be found.- Specified by:
getAggregateValuesArrayPositions
in interfaceAggregateEmbeddableResultGraphNode
-
getTiming
Description copied from interface:Fetch
immediate or delayed? todo (6.0) : should we also expose the fetch-style? Perhaps the fetch-options? -
hasTableGroup
public boolean hasTableGroup()Description copied from interface:Fetch
Is the TableGroup associated with this Fetch defined?- Specified by:
hasTableGroup
in interfaceFetch
-
getFetchParent
Description copied from interface:Fetch
Obtain the owner of this fetch. Ultimately used to identify the thing that "owns" this fetched navigable for the purpose of:* identifying the associated owner reference as we process the fetch * inject the fetched instance into the parent and potentially inject the parent reference into the fetched instance if it defines such injection (e.g.
Parent
)- Specified by:
getFetchParent
in interfaceFetch
-
getFetchContainer
- Specified by:
getFetchContainer
in classAbstractFetchParent
-
getReferencedMappingContainer
Description copied from interface:FetchParent
This parent's mapping type- Specified by:
getReferencedMappingContainer
in interfaceEmbeddableResultGraphNode
- Specified by:
getReferencedMappingContainer
in interfaceFetchParent
- Overrides:
getReferencedMappingContainer
in classAbstractFetchParent
-
getFetchedMapping
Description copied from interface:Fetch
The value mapping being fetched- Specified by:
getFetchedMapping
in interfaceFetch
-
getReferencedMappingType
Description copied from interface:FetchParent
This parent's mapping type- Specified by:
getReferencedMappingType
in interfaceEmbeddableResultGraphNode
- Specified by:
getReferencedMappingType
in interfaceFetchParent
-
createAssembler
public DomainResultAssembler createAssembler(InitializerParent<?> parent, AssemblerCreationState creationState) Description copied from interface:Fetch
Create the assembler for this fetch- Specified by:
createAssembler
in interfaceFetch
-
createInitializer
public EmbeddableInitializer<?> createInitializer(AggregateEmbeddableFetchImpl resultGraphNode, InitializerParent<?> parent, AssemblerCreationState creationState) - Specified by:
createInitializer
in interfaceInitializerProducer<AggregateEmbeddableFetchImpl>
-
createInitializer
public EmbeddableInitializer<?> createInitializer(InitializerParent<?> parent, AssemblerCreationState creationState) - Specified by:
createInitializer
in interfaceFetchParent
-
asFetchParent
Description copied from interface:Fetch
Utility method to avoidinstanceof
checks. Returns this if it's an instance ofFetchParent
, null otherwise.- Specified by:
asFetchParent
in interfaceFetch
-