Class SoftDeleteMappingImpl
java.lang.Object
org.hibernate.metamodel.mapping.internal.SoftDeleteMappingImpl
- All Implemented Interfaces:
Bindable
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMapping
,SoftDeleteMapping
,SqlExpressible
,SqlTypedMapping
,VirtualModelPart
SoftDeleteMapping implementation
-
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 inherited from interface org.hibernate.metamodel.mapping.SoftDeleteMapping
ROLE_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionSoftDeleteMappingImpl
(SoftDeletableModelPart softDeletable, SoftDeletable bootMapping, String tableName, MappingModelCreationProcess modelCreationProcess) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCacheKey
(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.void
applySqlSelections
(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.void
applySqlSelections
(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.<X,
Y> int breakDownJdbcValues
(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.createDeletedValueBinding
(ColumnReference softDeleteColumnReference) Create a ColumnValueBinding for deleted indicator.<T> DomainResult<T>
createDomainResult
(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.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" valuedisassemble
(Object value, SharedSessionContractImplementor session) Breaks down a value ofJ
into its simple pieces.<X,
Y> int forEachDisassembledJdbcValue
(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) LikeBindable.forEachDisassembledJdbcValue(Object, Object, Object, JdbcValuesBiConsumer, SharedSessionContractImplementor)
, but additionally receives an offset by which the selectionIndex is incremented when callingBindable.JdbcValuesBiConsumer.consume(int, Object, Object, Object, JdbcMapping)
.int
forEachJdbcType
(int offset, IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offsetThe name of the soft-delete indicator column.JavaType<?>
The Java type for this part.Anything that is expressible at the SQL AST level would be of basic type.The type for this part.The local part name, which is generally the unqualified role nameThe soft-delete strategy - how to interpret indicator valuesThe name of the table which holds the indicator columnboolean
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, getJdbcTypeCount
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getSingleJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, decompose, forEachSelectable, forEachSelectable, isEntityIdentifierMapping
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMapping
getSelectablePath
Methods inherited from interface org.hibernate.metamodel.mapping.SoftDeleteMapping
getColumnDefinition, getContainingTableExpression, getCustomReadExpression, getCustomWriteExpression, getLength, getPrecision, getScale, getSelectableName, getSelectionExpression, getTemporalPrecision, isFormula, isInsertable, isNullable, isPartitioned, isUpdateable
Methods inherited from interface org.hibernate.metamodel.mapping.SqlExpressible
getJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
isLob, toSize
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
Constructor Details
-
SoftDeleteMappingImpl
public SoftDeleteMappingImpl(SoftDeletableModelPart softDeletable, SoftDeletable bootMapping, String tableName, MappingModelCreationProcess modelCreationProcess)
-
-
Method Details
-
getSoftDeleteStrategy
Description copied from interface:SoftDeleteMapping
The soft-delete strategy - how to interpret indicator values- Specified by:
getSoftDeleteStrategy
in interfaceSoftDeleteMapping
-
getColumnName
Description copied from interface:SoftDeleteMapping
The name of the soft-delete indicator column.- Specified by:
getColumnName
in interfaceSoftDeleteMapping
-
getTableName
Description copied from interface:SoftDeleteMapping
The name of the table which holds the indicator column- Specified by:
getTableName
in interfaceSoftDeleteMapping
-
getWriteExpression
- Specified by:
getWriteExpression
in interfaceSelectableMapping
-
getDeletionIndicator
-
createSoftDeleteAssignment
Description copied from interface:SoftDeleteMapping
Create a SQL AST Assignment for setting the soft-delete column to its indicated "deleted" value- Specified by:
createSoftDeleteAssignment
in interfaceSoftDeleteMapping
- Parameters:
tableReference
- Reference for the table containing the soft-delete column
-
createNonDeletedRestriction
Description copied from interface:SoftDeleteMapping
Create a SQL AST Predicate for restricting matches to non-deleted rows- Specified by:
createNonDeletedRestriction
in interfaceSoftDeleteMapping
- Parameters:
tableReference
- Reference for the table containing the soft-delete column
-
createNonDeletedRestriction
public Predicate createNonDeletedRestriction(TableReference tableReference, SqlExpressionResolver expressionResolver) Description copied from interface:SoftDeleteMapping
Create a SQL AST Predicate for restricting matches to non-deleted rows- Specified by:
createNonDeletedRestriction
in interfaceSoftDeleteMapping
- Parameters:
tableReference
- Reference for the table containing the soft-delete columnexpressionResolver
- Resolver for SQL AST Expressions
-
createNonDeletedValueBinding
Description copied from interface:SoftDeleteMapping
Create a ColumnValueBinding for non-deleted indicator.- Specified by:
createNonDeletedValueBinding
in interfaceSoftDeleteMapping
- Parameters:
softDeleteColumnReference
- Reference to the soft-delete column
-
createDeletedValueBinding
Description copied from interface:SoftDeleteMapping
Create a ColumnValueBinding for deleted indicator.- Specified by:
createDeletedValueBinding
in interfaceSoftDeleteMapping
- Parameters:
softDeleteColumnReference
- Reference to the soft-delete column
-
getJdbcMapping
Description copied from interface:SqlExpressible
Anything that is expressible at the SQL AST level would be of basic type.- Specified by:
getJdbcMapping
in interfaceSqlExpressible
- Specified by:
getJdbcMapping
in interfaceSqlTypedMapping
-
getPartName
Description copied from interface:ModelPart
The local part name, which is generally the unqualified role name- Specified by:
getPartName
in interfaceModelPart
-
forEachJdbcType
Description copied from interface:JdbcMappingContainer
Visit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcType
in interfaceJdbcMappingContainer
-
getPartMappingType
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceModelPart
-
getJavaType
Description copied from interface:ModelPart
The Java type for this part. Generally equivalent toMappingType.getMappedJavaType()
relative toModelPart.getPartMappingType()
- Specified by:
getJavaType
in interfaceModelPart
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMapping
in interfaceModelPart
-
findContainingEntityMapping
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
toString
-