Package org.hibernate.sql.results.graph
Interface Fetchable
-
- All Superinterfaces:
Bindable
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
- All Known Subinterfaces:
AggregatedIdentifierMapping
,Association
,AttributeMapping
,BasicEntityIdentifierMapping
,BasicValuedModelPart
,CollectionIdentifierDescriptor
,CollectionPart
,CompositeIdentifierMapping
,DatabaseSnapshotContributor
,DiscriminatedAssociationModelPart
,DiscriminatorMapping
,EmbeddableDiscriminatorMapping
,EmbeddableValuedFetchable
,EmbeddableValuedModelPart
,EntityAssociationMapping
,EntityCollectionPart
,EntityDiscriminatorMapping
,EntityRowIdMapping
,EntityValuedFetchable
,EntityVersionMapping
,NonAggregatedIdentifierMapping
,PluralAttributeMapping
,SingleAttributeIdentifierMapping
,SingularAttributeMapping
- All Known Implementing Classes:
AbstractAttributeMapping
,AbstractCompositeIdentifierMapping
,AbstractDiscriminatorMapping
,AbstractEntityCollectionPart
,AbstractSingularAttributeMapping
,AbstractStateArrayContributorMapping
,AnonymousTupleBasicEntityIdentifierMapping
,AnonymousTupleBasicValuedModelPart
,AnonymousTupleEmbeddableValuedModelPart
,AnonymousTupleEmbeddedEntityIdentifierMapping
,AnonymousTupleNonAggregatedEntityIdentifierMapping
,AnyDiscriminatorPart
,AnyKeyPart
,BasicAttributeMapping
,BasicEntityIdentifierMappingImpl
,BasicValuedCollectionPart
,CaseStatementDiscriminatorMappingImpl
,CollectionIdentifierDescriptorImpl
,DiscriminatedAssociationAttributeMapping
,DiscriminatedCollectionPart
,EmbeddedAttributeMapping
,EmbeddedCollectionPart
,EmbeddedIdentifierMappingImpl
,EntityRowIdMappingImpl
,EntityVersionMappingImpl
,ExplicitColumnDiscriminatorMappingImpl
,InverseNonAggregatedIdentifierMapping
,ManyToManyCollectionPart
,NonAggregatedIdentifierMappingImpl
,OneToManyCollectionPart
,PluralAttributeMappingImpl
,SimpleForeignKeyDescriptor
,ToOneAttributeMapping
,VirtualEmbeddedAttributeMapping
@Incubating public interface Fetchable extends ModelPart
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AttributeMapping
asAttributeMapping()
Fetch
generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Generates a Fetch of this fetchableint
getFetchableKey()
The key that identifies this Fetchable within aFetchableContainer
.String
getFetchableName()
The name of the fetchable.FetchOptions
getMappedFetchOptions()
The configured fetch timing and styledefault boolean
incrementFetchDepth()
Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.default boolean
isSelectable()
default Fetch
resolveCircularFetch(NavigablePath fetchablePath, FetchParent fetchParent, FetchTiming fetchTiming, DomainResultCreationState creationState)
Check whether this Fetchable is considered a circular fetch.-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, getJdbcTypeCount
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMapping, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, findContainingEntityMapping, forEachSelectable, forEachSelectable, getJavaType, getNavigableRole, getPartMappingType, getPartName, hasPartitionedSelectionMapping, isEntityIdentifierMapping, isVirtual
-
-
-
-
Method Detail
-
getFetchableName
String getFetchableName()
The name of the fetchable. This is the part's "local name".
-
getFetchableKey
int getFetchableKey()
The key that identifies this Fetchable within aFetchableContainer
. If this Fetchable is part ofFetchableContainer.visitFetchables(IndexedConsumer, EntityMappingType)
, the values is guaranteed to be between 0 (inclusive) andFetchableContainer.getNumberOfFetchableKeys()
(exclusive). Other Fetchable objects may have a special negative value.The main intent of this key is to index e.g.
Fetch
objects in an array.
-
getMappedFetchOptions
FetchOptions getMappedFetchOptions()
The configured fetch timing and style
-
resolveCircularFetch
default Fetch resolveCircularFetch(NavigablePath fetchablePath, FetchParent fetchParent, FetchTiming fetchTiming, DomainResultCreationState creationState)
Check whether this Fetchable is considered a circular fetch.- Parameters:
fetchablePath
- The overall path within the graph- Returns:
- The Fetch representing the circularity;
null
indicates the fetch is not circular
-
generateFetch
Fetch generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Generates a Fetch of this fetchable- Parameters:
fetchParent
- The parent of the Fetch we are generatingfetchablePath
- The overall path within the graphfetchTiming
- The requested fetch timing
-
incrementFetchDepth
default boolean incrementFetchDepth()
Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.- See Also:
FetchSettings.MAX_FETCH_DEPTH
-
asAttributeMapping
default AttributeMapping asAttributeMapping()
- Specified by:
asAttributeMapping
in interfaceModelPart
-
isSelectable
default boolean isSelectable()
-
-