Class SoftDeleteHelper
- java.lang.Object
-
- org.hibernate.boot.model.internal.SoftDeleteHelper
-
public class SoftDeleteHelper extends Object
Helper for dealing withSoftDelete
-
-
Constructor Summary
Constructors Constructor Description SoftDeleteHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
bindSoftDeleteIndicator(SoftDelete softDeleteConfig, SoftDeletable target, Table table, MetadataBuildingContext context)
Creates and binds the column and value for modeling the soft-delete in the databasestatic Predicate
createNonSoftDeletedRestriction(TableReference tableReference, SoftDeleteMapping softDeleteMapping)
Create a SQL AST Predicate for restricting matches to non-deleted rowsstatic Predicate
createNonSoftDeletedRestriction(TableReference tableReference, SoftDeleteMapping softDeleteMapping, SqlExpressionResolver expressionResolver)
Create a SQL AST Predicate for restricting matches to non-deleted rowsstatic Assignment
createSoftDeleteAssignment(TableReference tableReference, SoftDeleteMapping softDeleteMapping)
Create a SQL AST Assignment for setting the soft-delete column to its deleted indicate valuestatic SoftDeleteMappingImpl
resolveSoftDeleteMapping(SoftDeletableModelPart softDeletableModelPart, SoftDeletable bootMapping, String tableName, Dialect dialect)
static SoftDeleteMappingImpl
resolveSoftDeleteMapping(SoftDeletableModelPart softDeletableModelPart, SoftDeletable bootMapping, String tableName, MappingModelCreationProcess creationProcess)
-
-
-
Method Detail
-
bindSoftDeleteIndicator
public static void bindSoftDeleteIndicator(SoftDelete softDeleteConfig, SoftDeletable target, Table table, MetadataBuildingContext context)
Creates and binds the column and value for modeling the soft-delete in the database- Parameters:
softDeleteConfig
- The SoftDelete annotationtarget
- The thing which is to be soft-deletedtable
- The table to which the soft-delete should be appliedcontext
- The processing context for access to needed info and services
-
resolveSoftDeleteMapping
public static SoftDeleteMappingImpl resolveSoftDeleteMapping(SoftDeletableModelPart softDeletableModelPart, SoftDeletable bootMapping, String tableName, MappingModelCreationProcess creationProcess)
-
resolveSoftDeleteMapping
public static SoftDeleteMappingImpl resolveSoftDeleteMapping(SoftDeletableModelPart softDeletableModelPart, SoftDeletable bootMapping, String tableName, Dialect dialect)
-
createNonSoftDeletedRestriction
public static Predicate createNonSoftDeletedRestriction(TableReference tableReference, SoftDeleteMapping softDeleteMapping)
Create a SQL AST Predicate for restricting matches to non-deleted rows- Parameters:
tableReference
- The table reference for the table containing the soft-delete columnsoftDeleteMapping
- The soft-delete mapping
-
createNonSoftDeletedRestriction
public static Predicate createNonSoftDeletedRestriction(TableReference tableReference, SoftDeleteMapping softDeleteMapping, SqlExpressionResolver expressionResolver)
Create a SQL AST Predicate for restricting matches to non-deleted rows- Parameters:
tableReference
- The table reference for the table containing the soft-delete columnsoftDeleteMapping
- The soft-delete mapping
-
createSoftDeleteAssignment
public static Assignment createSoftDeleteAssignment(TableReference tableReference, SoftDeleteMapping softDeleteMapping)
Create a SQL AST Assignment for setting the soft-delete column to its deleted indicate value- Parameters:
tableReference
- The table reference for the table containing the soft-delete columnsoftDeleteMapping
- The soft-delete mapping
-
-