Package org.hibernate.metamodel.mapping
Interface SoftDeleteMapping
- All Superinterfaces:
Bindable
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMapping
,SqlExpressible
,SqlTypedMapping
,VirtualModelPart
- All Known Implementing Classes:
SoftDeleteMappingImpl
Metadata about the indicator column for entities and collections enabled
for soft delete
- See Also:
-
Nested Class Summary
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 -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateDeletedValueBinding
(ColumnReference softDeleteColumnReference) Create a ColumnValueBinding for deleted indicator.createNonDeletedRestriction
(TableReference tableReference) Create a SQL AST Predicate for restricting matches to non-deleted rowscreateNonDeletedRestriction
(TableReference tableReference, SqlExpressionResolver expressionResolver) Create a SQL AST Predicate for restricting matches to non-deleted rowscreateNonDeletedValueBinding
(ColumnReference softDeleteColumnReference) Create a ColumnValueBinding for non-deleted indicator.createSoftDeleteAssignment
(TableReference tableReference) Create a SQL AST Assignment for setting the soft-delete column to its indicated "deleted" valuedefault String
The name of the soft-delete indicator column.default String
The name of the table to which this selectable is mappeddefault String
The selection's read expression accounting for formula treatment as well asColumnTransformer.read()
default String
The selection's write expression accountingColumnTransformer.write()
default Long
default Integer
default Integer
getScale()
default String
default String
The selection's expression.The soft-delete strategy - how to interpret indicator valuesThe name of the table which holds the indicator columndefault Integer
default boolean
Is the mapping a formula instead of a physical column?default boolean
default boolean
Is the mapping considered nullable?default boolean
default boolean
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, getJdbcTypeCount
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getSingleJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, findContainingEntityMapping, forEachSelectable, forEachSelectable, getJavaType, getNavigableRole, getPartMappingType, getPartName, hasPartitionedSelectionMapping, isEntityIdentifierMapping
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMapping
getSelectablePath, getWriteExpression
Methods inherited from interface org.hibernate.metamodel.mapping.SqlExpressible
getJdbcMapping, getJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
getJdbcMapping, isLob, toSize
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
Field Details
-
ROLE_NAME
- See Also:
-
-
Method Details
-
getSoftDeleteStrategy
SoftDeleteType getSoftDeleteStrategy()The soft-delete strategy - how to interpret indicator values -
getColumnName
String getColumnName()The name of the soft-delete indicator column. -
getTableName
String getTableName()The name of the table which holds the indicator column -
createSoftDeleteAssignment
Create a SQL AST Assignment for setting the soft-delete column to its indicated "deleted" value- Parameters:
tableReference
- Reference for the table containing the soft-delete column
-
createNonDeletedRestriction
Create a SQL AST Predicate for restricting matches to non-deleted rows- Parameters:
tableReference
- Reference for the table containing the soft-delete column
-
createNonDeletedRestriction
Predicate createNonDeletedRestriction(TableReference tableReference, SqlExpressionResolver expressionResolver) Create a SQL AST Predicate for restricting matches to non-deleted rows- Parameters:
tableReference
- Reference for the table containing the soft-delete columnexpressionResolver
- Resolver for SQL AST Expressions
-
createNonDeletedValueBinding
Create a ColumnValueBinding for non-deleted indicator.- Parameters:
softDeleteColumnReference
- Reference to the soft-delete column- API Note:
- Generally used as a restriction in a SQL AST
-
createDeletedValueBinding
Create a ColumnValueBinding for deleted indicator.- Parameters:
softDeleteColumnReference
- Reference to the soft-delete column- API Note:
- Generally used as an assignment in a SQL AST
-
getSelectionExpression
Description copied from interface:SelectableMapping
The selection's expression. This is the column name or formula- Specified by:
getSelectionExpression
in interfaceSelectableMapping
-
getSelectableName
- Specified by:
getSelectableName
in interfaceSelectableMapping
-
getContainingTableExpression
Description copied from interface:SelectableMapping
The name of the table to which this selectable is mapped- Specified by:
getContainingTableExpression
in interfaceSelectableMapping
-
getCustomReadExpression
Description copied from interface:SelectableMapping
The selection's read expression accounting for formula treatment as well asColumnTransformer.read()
- Specified by:
getCustomReadExpression
in interfaceSelectableMapping
-
getCustomWriteExpression
Description copied from interface:SelectableMapping
The selection's write expression accountingColumnTransformer.write()
- Specified by:
getCustomWriteExpression
in interfaceSelectableMapping
-
isFormula
default boolean isFormula()Description copied from interface:SelectableMapping
Is the mapping a formula instead of a physical column?- Specified by:
isFormula
in interfaceSelectableMapping
-
isNullable
default boolean isNullable()Description copied from interface:SelectableMapping
Is the mapping considered nullable?- Specified by:
isNullable
in interfaceSelectableMapping
-
isInsertable
default boolean isInsertable()- Specified by:
isInsertable
in interfaceSelectableMapping
-
isUpdateable
default boolean isUpdateable()- Specified by:
isUpdateable
in interfaceSelectableMapping
-
isPartitioned
default boolean isPartitioned()- Specified by:
isPartitioned
in interfaceSelectableMapping
-
getColumnDefinition
- Specified by:
getColumnDefinition
in interfaceSqlTypedMapping
-
getLength
- Specified by:
getLength
in interfaceSqlTypedMapping
-
getPrecision
- Specified by:
getPrecision
in interfaceSqlTypedMapping
-
getScale
- Specified by:
getScale
in interfaceSqlTypedMapping
-
getTemporalPrecision
- Specified by:
getTemporalPrecision
in interfaceSqlTypedMapping
-