Package org.hibernate.metamodel.mapping
Interface PluralAttributeMapping
-
- All Superinterfaces:
AttributeMapping,Bindable,DatabaseSnapshotContributor,Fetchable,FetchableContainer,FilterRestrictable,JavaTypedExpressible,JdbcMappingContainer,Loadable,MappingModelExpressible,ModelPart,ModelPartContainer,MutabilityPlanExposer,PropertyBasedMapping,Queryable,Restrictable,RootTableGroupProducer,TableGroupJoinProducer,TableGroupProducer,ValueMapping,WhereRestrictable
- All Known Implementing Classes:
PluralAttributeMappingImpl
public interface PluralAttributeMapping extends AttributeMapping, TableGroupJoinProducer, FetchableContainer, Loadable, Restrictable
Mapping of a plural (collection-valued) attribute
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePluralAttributeMapping.IndexMetadata-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidapplyBaseManyToManyRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)default voidapplyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)Applies the base set of restrictions.default voidapplyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, SqlAstCreationState creationState)Applies just theFiltervalues enabled for the associated entitydefault voidapplyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)Apply theWhererestrictionsdefault PluralAttributeMappingasPluralAttributeMapping()A utility method to avoid casting explicitly to PluralAttributeMappingdefault <T> DomainResult<T>createSnapshotDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)Create a DomainResult to be used when selecting snapshots from the database.CollectionPersistergetCollectionDescriptor()CollectionPartgetElementDescriptor()default FetchablegetFetchable(int position)CollectionIdentifierDescriptorgetIdentifierDescriptor()CollectionPartgetIndexDescriptor()PluralAttributeMapping.IndexMetadatagetIndexMetadata()ForeignKeyDescriptorgetKeyDescriptor()default FetchablegetKeyFetchable(int position)OrderByFragmentgetManyToManyOrderByFragment()CollectionMappingType<?>getMappedType()Descriptor for the type of this mappingdefault intgetNumberOfFetchables()The number of fetchables in the containerdefault intgetNumberOfKeyFetchables()The number of key fetchables in the containerOrderByFragmentgetOrderByFragment()StringgetSeparateCollectionTable()default booleanincrementFetchDepth()Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.booleanisBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)default booleanisPluralAttributeMapping()default voidvisitFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)default voidvisitFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)default voidvisitKeyFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)default voidvisitKeyFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)-
Methods inherited from interface org.hibernate.metamodel.mapping.AttributeMapping
asAttributeMapping, asEmbeddedAttributeMapping, findContainingEntityMapping, getAttributeMetadataAccess, getAttributeName, getDeclaringType, getExposedMutabilityPlan, getPartName, getPropertyAccess, getStateArrayPosition, getValue, getValueGeneration, isEmbeddedAttributeMapping, setValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, getJdbcMappings, getJdbcTypeCount
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getFetchableName, getMappedFetchOptions, resolveCircularFetch
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
visitFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType
-
Methods inherited from interface org.hibernate.loader.ast.spi.Loadable
getRootPathName, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEntityGraph
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, breakDownJdbcValues, createDomainResult, forEachSelectable, forEachSelectable, getJavaType, getNavigableRole, getPartMappingType
-
Methods inherited from interface org.hibernate.metamodel.mapping.Queryable
findByPath, findSubPart, findSubTypesSubPart, resolveSubPart, visitSubParts
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.RootTableGroupProducer
createRootTableGroup, createRootTableGroup
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createRootTableGroupJoin, createTableGroupJoin, createTableGroupJoin, getDefaultSqlAstJoinType, isSimpleJoinPredicate
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference, getSqlAliasStem
-
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:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getIndexMetadata
PluralAttributeMapping.IndexMetadata getIndexMetadata()
-
getElementDescriptor
CollectionPart getElementDescriptor()
-
getIdentifierDescriptor
CollectionIdentifierDescriptor getIdentifierDescriptor()
-
getOrderByFragment
OrderByFragment getOrderByFragment()
-
getManyToManyOrderByFragment
OrderByFragment getManyToManyOrderByFragment()
-
visitKeyFetchables
default void visitKeyFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitKeyFetchablesin interfaceFetchableContainer
-
getNumberOfKeyFetchables
default int getNumberOfKeyFetchables()
Description copied from interface:FetchableContainerThe number of key fetchables in the container- Specified by:
getNumberOfKeyFetchablesin interfaceFetchableContainer
-
getKeyFetchable
default Fetchable getKeyFetchable(int position)
- Specified by:
getKeyFetchablein interfaceFetchableContainer
-
visitKeyFetchables
default void visitKeyFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitKeyFetchablesin interfaceFetchableContainer
-
visitFetchables
default void visitFetchables(Consumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitFetchablesin interfaceFetchableContainer
-
getNumberOfFetchables
default int getNumberOfFetchables()
Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchablesin interfaceFetchableContainer
-
visitFetchables
default void visitFetchables(IndexedConsumer<Fetchable> fetchableConsumer, EntityMappingType treatTargetType)
- Specified by:
visitFetchablesin interfaceFetchableContainer
-
getFetchable
default Fetchable getFetchable(int position)
- Specified by:
getFetchablein interfaceFetchableContainer
-
createSnapshotDomainResult
default <T> DomainResult<T> createSnapshotDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:DatabaseSnapshotContributorCreate a DomainResult to be used when selecting snapshots from the database. By default, simply useModelPart.createDomainResult(org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.tree.from.TableGroup, java.lang.String, org.hibernate.sql.results.graph.DomainResultCreationState)- Specified by:
createSnapshotDomainResultin interfaceDatabaseSnapshotContributor
-
getSeparateCollectionTable
String getSeparateCollectionTable()
-
isBidirectionalAttributeName
boolean isBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)
-
incrementFetchDepth
default boolean incrementFetchDepth()
Description copied from interface:FetchableShould this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.- Specified by:
incrementFetchDepthin interfaceFetchable- See Also:
AvailableSettings.MAX_FETCH_DEPTH
-
applyFilterRestrictions
default void applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, SqlAstCreationState creationState)
Description copied from interface:FilterRestrictableApplies just theFiltervalues enabled for the associated entity- Specified by:
applyFilterRestrictionsin 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:RestrictableApplies the base set of restrictions. The impact varies based on Restrictable type - some apply restrictions for filter, where and/or discriminator- Specified by:
applyBaseRestrictionsin interfaceRestrictable
-
applyBaseManyToManyRestrictions
default void applyBaseManyToManyRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
-
applyWhereRestrictions
default void applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)
Description copied from interface:WhereRestrictableApply theWhererestrictions- Specified by:
applyWhereRestrictionsin interfaceWhereRestrictable
-
asPluralAttributeMapping
default PluralAttributeMapping asPluralAttributeMapping()
Description copied from interface:AttributeMappingA utility method to avoid casting explicitly to PluralAttributeMapping- Specified by:
asPluralAttributeMappingin interfaceAttributeMapping- Returns:
- PluralAttributeMapping if this is an instance of PluralAttributeMapping otherwise
null
-
isPluralAttributeMapping
default boolean isPluralAttributeMapping()
- Specified by:
isPluralAttributeMappingin interfaceAttributeMapping
-
-