Interface AuxiliaryMapping
- All Known Subinterfaces:
AuditMapping, SoftDeleteMapping, TemporalMapping
Unified mapping contract for state management strategies (soft-delete, temporal, audit).
- Since:
- 7.4
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddToInsertGroup(MutationGroupBuilder insertGroupBuilder, EntityPersister persister) voidapplyPredicate(Supplier<Consumer<Predicate>> predicateCollector, SqlAstCreationState creationState, TableGroup tableGroup, NamedTableReference rootTableReference, EntityMappingType entityMappingType) voidapplyPredicate(EntityMappingType associatedEntityMappingType, Consumer<Predicate> predicateConsumer, LazyTableGroup lazyTableGroup, NavigablePath navigablePath, SqlAstCreationState creationState) voidapplyPredicate(EntityMappingType associatedEntityDescriptor, Consumer<Predicate> predicateConsumer, TableGroup tableGroup, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers influencers) voidapplyPredicate(PluralAttributeMapping associatedEntityDescriptor, Consumer<Predicate> predicateConsumer, TableGroup tableGroup, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers influencers) default voidapplyPredicate(TableGroupJoin tableGroupJoin, LoadQueryInfluencers loadQueryInfluencers) Deprecated.voidapplyPredicate(TableGroupJoin tableGroupJoin, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers loadQueryInfluencers) default voidapplyPredicate(TableReferenceJoin tableReferenceJoin, NamedTableReference primaryTableReference, String originalTableName, EntityMappingType entityMappingType, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers influencers) Apply the auxiliary restriction to a joined table reference.Additional column expressions to include in each SELECT of a TABLE_PER_CLASS union subquery (e.g.The name of the primary auxiliary table.booleanisAffectedByInfluencers(LoadQueryInfluencers influencers) default StringresolveTableName(String originalTableName) Resolve the auxiliary table name for the given original table.booleanuseAuxiliaryTable(LoadQueryInfluencers influencers)
-
Method Details
-
getTableName
String getTableName()The name of the primary auxiliary table. For multi-table strategies (e.g. audit), useresolveTableName(String)to resolve per-table instead. -
resolveTableName
Resolve the auxiliary table name for the given original table. For multi-table inheritance or@SecondaryTable, each table may have its own auxiliary table. Defaults togetTableName(). -
addToInsertGroup
-
applyPredicate
void applyPredicate(EntityMappingType associatedEntityDescriptor, Consumer<Predicate> predicateConsumer, TableGroup tableGroup, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers influencers) -
applyPredicate
void applyPredicate(PluralAttributeMapping associatedEntityDescriptor, Consumer<Predicate> predicateConsumer, TableGroup tableGroup, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers influencers) -
applyPredicate
void applyPredicate(TableGroupJoin tableGroupJoin, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers loadQueryInfluencers) -
applyPredicate
@Deprecated default void applyPredicate(TableGroupJoin tableGroupJoin, LoadQueryInfluencers loadQueryInfluencers) Deprecated. -
applyPredicate
void applyPredicate(Supplier<Consumer<Predicate>> predicateCollector, SqlAstCreationState creationState, TableGroup tableGroup, NamedTableReference rootTableReference, EntityMappingType entityMappingType) -
applyPredicate
default void applyPredicate(TableReferenceJoin tableReferenceJoin, NamedTableReference primaryTableReference, String originalTableName, EntityMappingType entityMappingType, SqlAliasBaseGenerator sqlAliasBaseGenerator, LoadQueryInfluencers influencers) Apply the auxiliary restriction to a joined table reference. Used for JOINED inheritance where each table in the hierarchy has its own auxiliary table.- Parameters:
originalTableName- the original (non-auxiliary) table name
-
getExtraSelectExpressions
-
getJdbcMapping
JdbcMapping getJdbcMapping() -
useAuxiliaryTable
-
isAffectedByInfluencers
-
applyPredicate(TableGroupJoin, SqlAliasBaseGenerator, LoadQueryInfluencers)instead.