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 whenEmbeddableMappingType.shouldSelectAggregateMapping()returnstrue. The main difference is that it selects only the aggregate column and usesDomainResultCreationState.visitNestedFetches(FetchParent)for creating the fetches for the attributes of the embeddable.
-
-
Constructor Summary
Constructors Constructor Description AggregateEmbeddableFetchImpl(NavigablePath navigablePath, EmbeddableValuedFetchable embeddedPartDescriptor, FetchParent fetchParent, FetchTiming fetchTiming, boolean hasTableGroup, DomainResultCreationState creationState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FetchParentasFetchParent()Utility method to avoidinstanceofchecks.DomainResultAssemblercreateAssembler(InitializerParent<?> parent, AssemblerCreationState creationState)Create the assembler for this fetchEmbeddableInitializer<?>createInitializer(AggregateEmbeddableFetchImpl resultGraphNode, InitializerParent<?> parent, AssemblerCreationState creationState)EmbeddableInitializer<?>createInitializer(InitializerParent<?> parent, AssemblerCreationState creationState)int[]getAggregateValuesArrayPositions()Returns the positions within the values array of the respective nesting level at which the data for this aggregate can be found.EmbeddableMappingTypegetFetchContainer()FetchablegetFetchedMapping()The value mapping being fetchedFetchParentgetFetchParent()Obtain the owner of this fetch.EmbeddableValuedModelPartgetReferencedMappingContainer()This parent's mapping typeEmbeddableMappingTypegetReferencedMappingType()This parent's mapping typeFetchTiminggetTiming()immediate or delayed? todo (6.0) : should we also expose the fetch-style? Perhaps the fetch-options?booleanhasTableGroup()Is the TableGroup associated with this Fetch defined?NavigablePathresolveNavigablePath(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 Detail
-
AggregateEmbeddableFetchImpl
public AggregateEmbeddableFetchImpl(NavigablePath navigablePath, EmbeddableValuedFetchable embeddedPartDescriptor, FetchParent fetchParent, FetchTiming fetchTiming, boolean hasTableGroup, DomainResultCreationState creationState)
-
-
Method Detail
-
getAggregateValuesArrayPositions
public int[] getAggregateValuesArrayPositions()
Description copied from interface:AggregateEmbeddableResultGraphNodeReturns the positions within the values array of the respective nesting level at which the data for this aggregate can be found.- Specified by:
getAggregateValuesArrayPositionsin interfaceAggregateEmbeddableResultGraphNode
-
getTiming
public FetchTiming getTiming()
Description copied from interface:Fetchimmediate or delayed? todo (6.0) : should we also expose the fetch-style? Perhaps the fetch-options?
-
hasTableGroup
public boolean hasTableGroup()
Description copied from interface:FetchIs the TableGroup associated with this Fetch defined?- Specified by:
hasTableGroupin interfaceFetch
-
getFetchParent
public FetchParent getFetchParent()
Description copied from interface:FetchObtain 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:
getFetchParentin interfaceFetch
-
getFetchContainer
public EmbeddableMappingType getFetchContainer()
- Specified by:
getFetchContainerin classAbstractFetchParent
-
getReferencedMappingContainer
public EmbeddableValuedModelPart getReferencedMappingContainer()
Description copied from interface:FetchParentThis parent's mapping type- Specified by:
getReferencedMappingContainerin interfaceEmbeddableResultGraphNode- Specified by:
getReferencedMappingContainerin interfaceFetchParent- Overrides:
getReferencedMappingContainerin classAbstractFetchParent
-
getFetchedMapping
public Fetchable getFetchedMapping()
Description copied from interface:FetchThe value mapping being fetched- Specified by:
getFetchedMappingin interfaceFetch
-
resolveNavigablePath
public NavigablePath resolveNavigablePath(Fetchable fetchable)
- Specified by:
resolveNavigablePathin interfaceFetchParent
-
getReferencedMappingType
public EmbeddableMappingType getReferencedMappingType()
Description copied from interface:FetchParentThis parent's mapping type- Specified by:
getReferencedMappingTypein interfaceEmbeddableResultGraphNode- Specified by:
getReferencedMappingTypein interfaceFetchParent
-
createAssembler
public DomainResultAssembler createAssembler(InitializerParent<?> parent, AssemblerCreationState creationState)
Description copied from interface:FetchCreate the assembler for this fetch- Specified by:
createAssemblerin interfaceFetch
-
createInitializer
public EmbeddableInitializer<?> createInitializer(AggregateEmbeddableFetchImpl resultGraphNode, InitializerParent<?> parent, AssemblerCreationState creationState)
- Specified by:
createInitializerin interfaceInitializerProducer<AggregateEmbeddableFetchImpl>
-
createInitializer
public EmbeddableInitializer<?> createInitializer(InitializerParent<?> parent, AssemblerCreationState creationState)
- Specified by:
createInitializerin interfaceFetchParent
-
asFetchParent
public FetchParent asFetchParent()
Description copied from interface:FetchUtility method to avoidinstanceofchecks. Returns this if it's an instance ofFetchParent, null otherwise.- Specified by:
asFetchParentin interfaceFetch
-
-