Package org.hibernate.metamodel.mapping
Interface PluralAttributeMapping
-
- All Superinterfaces:
AttributeMapping
,Bindable
,DatabaseSnapshotContributor
,Fetchable
,FetchableContainer
,FilterRestrictable
,JavaTypedExpressible
,JdbcMappingContainer
,Loadable
,MappingModelExpressible
,ModelPart
,ModelPartContainer
,MutabilityPlanExposer
,OwnedValuedModelPart
,PropertyBasedMapping
,Restrictable
,RootTableGroupProducer
,SelectableMappings
,SoftDeletableModelPart
,TableGroupJoinProducer
,TableGroupProducer
,ValuedModelPart
,ValueMapping
,WhereRestrictable
- All Known Implementing Classes:
PluralAttributeMappingImpl
public interface PluralAttributeMapping extends AttributeMapping, TableGroupJoinProducer, FetchableContainer, Loadable, Restrictable, SoftDeletableModelPart
Mapping of a plural (collection-valued) attribute
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PluralAttributeMapping.IndexMetadata
static interface
PluralAttributeMapping.PredicateConsumer
-
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 void
applyBaseManyToManyRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
default void
applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
Applies the base set of restrictions.default void
applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, SqlAstCreationState creationState)
Applies just theFilter
values enabled for the associated entityvoid
applySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer)
default void
applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)
Apply theWhere
restrictionsdefault PluralAttributeMapping
asPluralAttributeMapping()
A utility method to avoid casting explicitly to PluralAttributeMappingdefault <T> DomainResult<T>
createSnapshotDomainResult(NavigablePath navigablePath, TableGroup parentTableGroup, String resultVariable, DomainResultCreationState creationState)
Create a DomainResult to be used when selecting snapshots from the database.CollectionPersister
getCollectionDescriptor()
CollectionPart
getElementDescriptor()
default Fetchable
getFetchable(int position)
CollectionIdentifierDescriptor
getIdentifierDescriptor()
CollectionPart
getIndexDescriptor()
PluralAttributeMapping.IndexMetadata
getIndexMetadata()
ForeignKeyDescriptor
getKeyDescriptor()
default Fetchable
getKeyFetchable(int position)
OrderByFragment
getManyToManyOrderByFragment()
CollectionMappingType<?>
getMappedType()
Descriptor for the type of this mappingdefault int
getNumberOfFetchableKeys()
The number of fetchables in the containerdefault int
getNumberOfFetchables()
The number of fetchables in the containerdefault int
getNumberOfKeyFetchables()
The number of key fetchables in the containerOrderByFragment
getOrderByFragment()
String
getSeparateCollectionTable()
default SoftDeleteMapping
getSoftDeleteMapping()
Mapping for soft-delete support, ornull
if soft-delete not defineddefault boolean
hasWhereRestrictions()
Does this restrictable have a where restriction?default boolean
incrementFetchDepth()
Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.boolean
isBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)
default boolean
isPluralAttributeMapping()
default void
visitFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
default void
visitFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
default void
visitKeyFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
default void
visitKeyFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
-
Methods inherited from interface org.hibernate.metamodel.mapping.AttributeMapping
asAttributeMapping, asEmbeddedAttributeMapping, compare, findContainingEntityMapping, getAttributeMetadata, getAttributeName, getDeclaringType, getExposedMutabilityPlan, getGenerator, getPartName, getPropertyAccess, getStateArrayPosition, getValue, isEmbeddedAttributeMapping, setValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getFetchableKey, getFetchableName, getMappedFetchOptions, isSelectable, resolveCircularFetch
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getSelectableIndex, visitFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMapping
-
Methods inherited from interface org.hibernate.loader.ast.spi.Loadable
getBatchSize, getRootPathName, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEntityGraph, isAffectedByInfluencers, isNotAffectedByInfluencers
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, isEntityIdentifierMapping, isVirtual
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, findSubPart, forEachSubPart, forEachSubPart, visitSubParts
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.RootTableGroupProducer
createRootTableGroup
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectable
-
Methods inherited from interface org.hibernate.metamodel.mapping.SoftDeletableModelPart
getSoftDeleteTableDetails
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createTableGroupJoin, determineSqlJoinType, getDefaultSqlAstJoinType, isSimpleJoinPredicate
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference, getSqlAliasStem
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getContainingTableExpression, getJdbcTypeCount, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
-
-
-
Method Detail
-
getCollectionDescriptor
CollectionPersister getCollectionDescriptor()
-
getKeyDescriptor
ForeignKeyDescriptor getKeyDescriptor()
-
getIndexDescriptor
CollectionPart getIndexDescriptor()
-
getMappedType
CollectionMappingType<?> getMappedType()
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceValueMapping
-
applySoftDeleteRestrictions
void applySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer)
-
getIndexMetadata
PluralAttributeMapping.IndexMetadata getIndexMetadata()
-
getElementDescriptor
CollectionPart getElementDescriptor()
-
getIdentifierDescriptor
CollectionIdentifierDescriptor getIdentifierDescriptor()
-
getSoftDeleteMapping
default SoftDeleteMapping getSoftDeleteMapping()
Mapping for soft-delete support, ornull
if soft-delete not defined- Specified by:
getSoftDeleteMapping
in interfaceSoftDeletableModelPart
-
getOrderByFragment
OrderByFragment getOrderByFragment()
-
getManyToManyOrderByFragment
OrderByFragment getManyToManyOrderByFragment()
-
visitKeyFetchables
default void visitKeyFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitKeyFetchables
in interfaceFetchableContainer
-
getNumberOfKeyFetchables
default int getNumberOfKeyFetchables()
Description copied from interface:FetchableContainer
The number of key fetchables in the container- Specified by:
getNumberOfKeyFetchables
in interfaceFetchableContainer
-
getKeyFetchable
default Fetchable getKeyFetchable(int position)
- Specified by:
getKeyFetchable
in interfaceFetchableContainer
-
visitKeyFetchables
default void visitKeyFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitKeyFetchables
in interfaceFetchableContainer
-
visitFetchables
default void visitFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitFetchables
in interfaceFetchableContainer
-
getNumberOfFetchables
default int getNumberOfFetchables()
Description copied from interface:FetchableContainer
The number of fetchables in the container- Specified by:
getNumberOfFetchables
in interfaceFetchableContainer
-
getNumberOfFetchableKeys
default int getNumberOfFetchableKeys()
Description copied from interface:FetchableContainer
The number of fetchables in the container- Specified by:
getNumberOfFetchableKeys
in interfaceFetchableContainer
-
visitFetchables
default void visitFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitFetchables
in interfaceFetchableContainer
-
getFetchable
default Fetchable getFetchable(int position)
- Specified by:
getFetchable
in interfaceFetchableContainer
-
createSnapshotDomainResult
default <T> DomainResult<T> createSnapshotDomainResult(NavigablePath navigablePath, TableGroup parentTableGroup, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:DatabaseSnapshotContributor
Create a DomainResult to be used when selecting snapshots from the database.By default, simply use
ModelPart.createDomainResult(org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.tree.from.TableGroup, java.lang.String, org.hibernate.sql.results.graph.DomainResultCreationState)
- Specified by:
createSnapshotDomainResult
in interfaceDatabaseSnapshotContributor
-
getSeparateCollectionTable
String getSeparateCollectionTable()
-
isBidirectionalAttributeName
boolean isBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)
-
incrementFetchDepth
default boolean incrementFetchDepth()
Description copied from interface:Fetchable
Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.- Specified by:
incrementFetchDepth
in interfaceFetchable
- See Also:
FetchSettings.MAX_FETCH_DEPTH
-
applyFilterRestrictions
default void applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, SqlAstCreationState creationState)
Description copied from interface:FilterRestrictable
Applies just theFilter
values enabled for the associated entity- Specified by:
applyFilterRestrictions
in interfaceFilterRestrictable
-
applyBaseRestrictions
default void applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
Description copied from interface:Restrictable
Applies the base set of restrictions.- Specified by:
applyBaseRestrictions
in interfaceRestrictable
-
applyBaseManyToManyRestrictions
default void applyBaseManyToManyRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
-
hasWhereRestrictions
default boolean hasWhereRestrictions()
Description copied from interface:WhereRestrictable
Does this restrictable have a where restriction?- Specified by:
hasWhereRestrictions
in interfaceWhereRestrictable
-
applyWhereRestrictions
default void applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)
Description copied from interface:WhereRestrictable
Apply theWhere
restrictions- Specified by:
applyWhereRestrictions
in interfaceWhereRestrictable
-
asPluralAttributeMapping
default PluralAttributeMapping asPluralAttributeMapping()
Description copied from interface:AttributeMapping
A utility method to avoid casting explicitly to PluralAttributeMapping- Specified by:
asPluralAttributeMapping
in interfaceAttributeMapping
- Returns:
- PluralAttributeMapping if this is an instance of PluralAttributeMapping otherwise
null
-
isPluralAttributeMapping
default boolean isPluralAttributeMapping()
- Specified by:
isPluralAttributeMapping
in interfaceAttributeMapping
-
-