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
@Incubatingpublic interfaceFetchableextendsModelPart
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 defaultAttributeMappingasAttributeMapping()FetchgenerateFetch(FetchParent fetchParent,NavigablePath fetchablePath,FetchTiming fetchTiming, boolean selected,String resultVariable,DomainResultCreationState creationState)Generates a Fetch of this fetchableintgetFetchableKey()The key that identifies thisFetchable within aFetchableContainer.StringgetFetchableName()The name of the fetchable.FetchOptionsgetMappedFetchOptions()The configured fetch timing and styledefault booleanincrementFetchDepth()Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.default booleanisSelectable()defaultFetchresolveCircularFetch(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 thisFetchable within aFetchableContainer. If thisFetchable is part ofFetchableContainer.visitFetchables(IndexedConsumer, EntityMappingType), the values is guaranteed to be between 0 (inclusive) andFetchableContainer.getNumberOfFetchableKeys()(exclusive). OtherFetchable objects may have a special negative value.The main intent of this key is to index e.g.
Fetchobjects 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;
nullindicates 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:
asAttributeMappingin interfaceModelPart
isSelectable
default boolean isSelectable()