Top Description Inners Methods
org.hibernate.metamodel.mapping

public Interface PluralAttributeMapping

extends AttributeMapping, TableGroupJoinProducer, FetchableContainer, Loadable, Restrictable, SoftDeletableModelPart
Known Direct Implementers
org.hibernate.metamodel.mapping.internal.PluralAttributeMappingImpl
Imports
java.util.Map, .Set, java.util.function.Consumer, org.hibernate.Filter, org.hibernate.internal.util.IndexedConsumer, org.hibernate.loader.ast.spi.Loadable, org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping, org.hibernate.metamodel.mapping.ordering.OrderByFragment, org.hibernate.persister.collection.CollectionPersister, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.spi.SqlAstCreationState, org.hibernate.sql.ast.tree.from.TableGroup, .TableGroupJoinProducer, org.hibernate.sql.ast.tree.predicate.Predicate, org.hibernate.sql.results.graph.DomainResult, .DomainResultCreationState, .Fetchable, .FetchableContainer, org.hibernate.sql.results.graph.basic.BasicResult

Mapping of a plural (collection-valued) attribute
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static interface

Method Summary

Modifier and TypeMethod and Description
public default void
applyBaseManyToManyRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)

public default void
applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.Restrictable.applyBaseRestrictions.

Applies the base set of restrictions.
public default void
applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.FilterRestrictable.applyFilterRestrictions.

Applies just the org.hibernate.annotations.Filter values enabled for the associated entity
public void
public default void
public default PluralAttributeMapping
asPluralAttributeMapping()

Overrides default org.hibernate.metamodel.mapping.AttributeMapping.asPluralAttributeMapping.

A utility method to avoid casting explicitly to PluralAttributeMapping
public default <T> DomainResult<T>
createSnapshotDomainResult(NavigablePath navigablePath, TableGroup parentTableGroup, String resultVariable, DomainResultCreationState creationState)

Overrides default org.hibernate.sql.results.graph.DatabaseSnapshotContributor.createSnapshotDomainResult.

Create a DomainResult to be used when selecting snapshots from the database.
public CollectionPersister
public CollectionPart
public default Fetchable
public CollectionIdentifierDescriptor
public CollectionPart
public PluralAttributeMapping.IndexMetadata
public ForeignKeyDescriptor
public default Fetchable
public OrderByFragment
public CollectionMappingType<?>
getMappedType()

Redeclares org.hibernate.metamodel.mapping.ValueMapping.getMappedType.

Descriptor for the type of this mapping
public default int
public default int
public default int
getNumberOfKeyFetchables()

Overrides default org.hibernate.sql.results.graph.FetchableContainer.getNumberOfKeyFetchables.

The number of key fetchables in the container
public OrderByFragment
public String
public default SoftDeleteMapping
getSoftDeleteMapping()

Implements org.hibernate.metamodel.mapping.SoftDeletableModelPart.getSoftDeleteMapping.

Mapping for soft-delete support, or null if soft-delete not defined
public default boolean
hasWhereRestrictions()

Implements org.hibernate.metamodel.mapping.WhereRestrictable.hasWhereRestrictions.

Does this restrictable have a where restriction?
public default boolean
incrementFetchDepth()

Overrides default org.hibernate.sql.results.graph.Fetchable.incrementFetchDepth.

Should this Fetchable affect the fetch depth?
public boolean
public default boolean
public default void
public default void
public default void
public default void
Inherited from org.hibernate.loader.ast.spi.Loadable:
getBatchSizegetRootPathNameisAffectedByEnabledFetchProfilesisAffectedByEnabledFiltersisAffectedByEntityGraphisAffectedByInfluencersisNotAffectedByInfluencers
Inherited from org.hibernate.metamodel.mapping.AttributeMapping:
asAttributeMappingasEmbeddedAttributeMappingcomparefindContainingEntityMappinggetAttributeMetadatagetAttributeNamegetDeclaringTypegetExposedMutabilityPlangetGeneratorgetPartNamegetPropertyAccessgetStateArrayPositiongetValueisEmbeddedAttributeMappingsetValue
Inherited from org.hibernate.metamodel.mapping.SoftDeletableModelPart:
getSoftDeleteTableDetails
Inherited from org.hibernate.sql.ast.tree.from.TableGroupJoinProducer:
createRootTableGroupJoincreateTableGroupJoindetermineSqlJoinTypegetDefaultSqlAstJoinTypeisSimpleJoinPredicate
Inherited from org.hibernate.sql.results.graph.FetchableContainer:
getSelectableIndexvisitFetchablesvisitKeyFetchables

Method Detail

applyBaseManyToManyRestrictionsback to summary
public default void applyBaseManyToManyRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
applyBaseRestrictionsback to summary
public default void applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.Restrictable.applyBaseRestrictions.

Doc from org.hibernate.metamodel.mapping.Restrictable.applyBaseRestrictions.

Applies the base set of restrictions.

Annotations
@Override
applyFilterRestrictionsback to summary
public default void applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String, Filter> enabledFilters, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.FilterRestrictable.applyFilterRestrictions.

Doc from org.hibernate.metamodel.mapping.FilterRestrictable.applyFilterRestrictions.

Applies just the org.hibernate.annotations.Filter values enabled for the associated entity

Annotations
@Override
applySoftDeleteRestrictionsback to summary
public void applySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer)
applyWhereRestrictionsback to summary
public default void applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.WhereRestrictable.applyWhereRestrictions.

Doc from org.hibernate.metamodel.mapping.WhereRestrictable.applyWhereRestrictions.

Apply the org.hibernate.annotations.Where restrictions

Annotations
@Override
asPluralAttributeMappingback to summary
public default PluralAttributeMapping asPluralAttributeMapping()

Overrides default org.hibernate.metamodel.mapping.AttributeMapping.asPluralAttributeMapping.

Doc from org.hibernate.metamodel.mapping.AttributeMapping.asPluralAttributeMapping.

A utility method to avoid casting explicitly to PluralAttributeMapping

Returns:PluralAttributeMapping

PluralAttributeMapping if this is an instance of PluralAttributeMapping otherwise null

Annotations
@Override
createSnapshotDomainResultback to summary
public default <T> DomainResult<T> createSnapshotDomainResult(NavigablePath navigablePath, TableGroup parentTableGroup, String resultVariable, DomainResultCreationState creationState)

Overrides default org.hibernate.sql.results.graph.DatabaseSnapshotContributor.createSnapshotDomainResult.

Doc from org.hibernate.sql.results.graph.DatabaseSnapshotContributor.createSnapshotDomainResult.

Create a DomainResult to be used when selecting snapshots from the database.

By default, simply use createDomainResult

Annotations
@SuppressWarnings:unchecked, rawtypes
@Override
getCollectionDescriptorback to summary
public CollectionPersister getCollectionDescriptor()
getElementDescriptorback to summary
public CollectionPart getElementDescriptor()
getFetchableback to summary
public default Fetchable getFetchable(int position)

Overrides default org.hibernate.sql.results.graph.FetchableContainer.getFetchable.

Annotations
@Override
getIdentifierDescriptorback to summary
public CollectionIdentifierDescriptor getIdentifierDescriptor()
getIndexDescriptorback to summary
public CollectionPart getIndexDescriptor()
getIndexMetadataback to summary
public PluralAttributeMapping.IndexMetadata getIndexMetadata()
getKeyDescriptorback to summary
public ForeignKeyDescriptor getKeyDescriptor()
getKeyFetchableback to summary
public default Fetchable getKeyFetchable(int position)

Overrides default org.hibernate.sql.results.graph.FetchableContainer.getKeyFetchable.

Annotations
@Override
getManyToManyOrderByFragmentback to summary
public OrderByFragment getManyToManyOrderByFragment()
getMappedTypeback to summary
public CollectionMappingType<?> getMappedType()

Redeclares org.hibernate.metamodel.mapping.ValueMapping.getMappedType.

Doc from org.hibernate.metamodel.mapping.ValueMapping.getMappedType.

Descriptor for the type of this mapping

Annotations
@Override
getNumberOfFetchableKeysback to summary
public default int getNumberOfFetchableKeys()

Overrides default org.hibernate.sql.results.graph.FetchableContainer.getNumberOfFetchableKeys.

Doc from org.hibernate.sql.results.graph.FetchableContainer.getNumberOfFetchableKeys.

The number of fetchables in the container

Annotations
@Override
getNumberOfFetchablesback to summary
public default int getNumberOfFetchables()

Implements org.hibernate.sql.results.graph.FetchableContainer.getNumberOfFetchables.

Doc from org.hibernate.sql.results.graph.FetchableContainer.getNumberOfFetchables.

The number of fetchables in the container

Annotations
@Override
getNumberOfKeyFetchablesback to summary
public default int getNumberOfKeyFetchables()

Overrides default org.hibernate.sql.results.graph.FetchableContainer.getNumberOfKeyFetchables.

Doc from org.hibernate.sql.results.graph.FetchableContainer.getNumberOfKeyFetchables.

The number of key fetchables in the container

Annotations
@Override
getOrderByFragmentback to summary
public OrderByFragment getOrderByFragment()
getSeparateCollectionTableback to summary
public String getSeparateCollectionTable()
getSoftDeleteMappingback to summary
public default SoftDeleteMapping getSoftDeleteMapping()

Implements org.hibernate.metamodel.mapping.SoftDeletableModelPart.getSoftDeleteMapping.

Mapping for soft-delete support, or null if soft-delete not defined

hasWhereRestrictionsback to summary
public default boolean hasWhereRestrictions()

Implements org.hibernate.metamodel.mapping.WhereRestrictable.hasWhereRestrictions.

Doc from org.hibernate.metamodel.mapping.WhereRestrictable.hasWhereRestrictions.

Does this restrictable have a where restriction?

Annotations
@Override
incrementFetchDepthback to summary
public default boolean incrementFetchDepth()

Overrides default org.hibernate.sql.results.graph.Fetchable.incrementFetchDepth.

Doc from org.hibernate.sql.results.graph.Fetchable.incrementFetchDepth.

Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.

Annotations
@Override
isBidirectionalAttributeNameback to summary
public boolean isBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)
isPluralAttributeMappingback to summary
public default boolean isPluralAttributeMapping()

Overrides default org.hibernate.metamodel.mapping.AttributeMapping.isPluralAttributeMapping.

Annotations
@Override
visitFetchablesback to summary
public default void visitFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)

Overrides default org.hibernate.sql.results.graph.FetchableContainer.visitFetchables.

Annotations
@Override
visitFetchablesback to summary
public default void visitFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)

Overrides default org.hibernate.sql.results.graph.FetchableContainer.visitFetchables.

Annotations
@Override
visitKeyFetchablesback to summary
public default void visitKeyFetchables(Consumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)

Overrides default org.hibernate.sql.results.graph.FetchableContainer.visitKeyFetchables.

Annotations
@Override
visitKeyFetchablesback to summary
public default void visitKeyFetchables(IndexedConsumer<? super Fetchable> fetchableConsumer, EntityMappingType treatTargetType)

Overrides default org.hibernate.sql.results.graph.FetchableContainer.visitKeyFetchables.

Annotations
@Override
org.hibernate.metamodel.mapping back to summary

public Interface PluralAttributeMapping.IndexMetadata


Method Summary

Modifier and TypeMethod and Description
public CollectionPart
public String
public int

Method Detail

getIndexDescriptorback to summary
public CollectionPart getIndexDescriptor()
getIndexPropertyNameback to summary
public String getIndexPropertyName()
getListIndexBaseback to summary
public int getListIndexBase()
org.hibernate.metamodel.mapping back to summary

public Interface PluralAttributeMapping.PredicateConsumer

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

applyPredicateback to summary
public void applyPredicate(Predicate predicate)