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 ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfaceNested 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
Modifier and TypeMethodDescriptiondefault 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, boolean onlyApplyLoadByKeyFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState) Applies the base set of restrictions.default voidapplyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, SqlAstCreationState creationState) Applies just theFiltervalues enabled for the associated entityvoidapplySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer) default voidapplyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState) Apply theSQLRestrictionrestrictionsdefault PluralAttributeMappingA 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.default FetchablegetFetchable(int position) default FetchablegetKeyFetchable(int position) Descriptor for the type of this mappingdefault intThe number of fetchables in the containerdefault intThe number of fetchables in the containerdefault intThe number of key fetchables in the containerdefault SoftDeleteMappingMapping for soft-delete support, ornullif soft-delete not defineddefault booleanDoes this restrictable have a where restriction?default booleanShould this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.booleanisBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart) default booleandefault voidvisitFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType) default voidvisitFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType) default voidvisitKeyFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType) default voidvisitKeyFetchables(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, setValueMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getFetchableKey, getFetchableName, getMappedFetchOptions, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getSelectableIndex, visitFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictionsMethods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKeyMethods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMappingMethods inherited from interface org.hibernate.loader.ast.spi.Loadable
getBatchSize, getRootPathName, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEntityGraph, isAffectedByInfluencers, isAffectedByInfluencers, isNotAffectedByInfluencersMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, getJavaType, getNavigableRole, getPartMappingType, hasPartitionedSelectionMapping, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, findSubPart, forEachSubPart, forEachSubPart, visitSubPartsMethods inherited from interface org.hibernate.metamodel.mapping.Restrictable
applyBaseRestrictionsMethods inherited from interface org.hibernate.sql.ast.tree.from.RootTableGroupProducer
createRootTableGroupMethods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectableMethods inherited from interface org.hibernate.metamodel.mapping.SoftDeletableModelPart
getSoftDeleteTableDetailsMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createTableGroupJoin, determineSqlJoinType, getDefaultSqlAstJoinType, isSimpleJoinPredicateMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference, getSqlAliasStemMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getContainingTableExpression, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Method Details
-
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
-
applySoftDeleteRestrictions
void applySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer) -
getIndexMetadata
PluralAttributeMapping.IndexMetadata getIndexMetadata() -
getElementDescriptor
CollectionPart getElementDescriptor() -
getIdentifierDescriptor
CollectionIdentifierDescriptor getIdentifierDescriptor() -
getSoftDeleteMapping
Mapping for soft-delete support, ornullif soft-delete not defined- Specified by:
getSoftDeleteMappingin interfaceSoftDeletableModelPart
-
getOrderByFragment
OrderByFragment getOrderByFragment() -
getManyToManyOrderByFragment
OrderByFragment getManyToManyOrderByFragment() -
visitKeyFetchables
default void visitKeyFetchables(Consumer<? super 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
- Specified by:
getKeyFetchablein interfaceFetchableContainer
-
visitKeyFetchables
default void visitKeyFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType) - Specified by:
visitKeyFetchablesin interfaceFetchableContainer
-
visitFetchables
default void visitFetchables(Consumer<? super 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
-
getNumberOfFetchableKeys
default int getNumberOfFetchableKeys()Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchableKeysin interfaceFetchableContainer
-
visitFetchables
default void visitFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType) - Specified by:
visitFetchablesin interfaceFetchableContainer
-
getFetchable
- Specified by:
getFetchablein interfaceFetchableContainer
-
getSeparateCollectionTable
String getSeparateCollectionTable() -
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:
-
applyFilterRestrictions
default void applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, 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, boolean onlyApplyLoadByKeyFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState) Description copied from interface:RestrictableApplies the base set of restrictions.- Specified by:
applyBaseRestrictionsin 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:WhereRestrictableDoes this restrictable have a where restriction?- Specified by:
hasWhereRestrictionsin interfaceWhereRestrictable
-
applyWhereRestrictions
default void applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState) Description copied from interface:WhereRestrictableApply theSQLRestrictionrestrictions- Specified by:
applyWhereRestrictionsin interfaceWhereRestrictable
-
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
-