Class ConditionalSoftDeleteDbRowOpFactory
java.lang.Object
org.apache.cayenne.access.flush.operation.ConditionalSoftDeleteDbRowOpFactory
- All Implemented Interfaces:
DeleteDbRowOpFactory
A
DeleteDbRowOpFactory enabling "soft delete". For tables that contain a BOOLEAN column with the configured
name it produces SoftDeleteDbRowOp, so the row is deleted by an UPDATE setting that column to true.
Tables without such a column (or whose column of that name is not BOOLEAN) get a plain DeleteDbRowOp and
are deleted with a regular SQL DELETE.- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOp(Persistent object, DbEntity entity, ObjectId id) Creates a delete op for a given object and target table.
-
Constructor Details
-
ConditionalSoftDeleteDbRowOpFactory
-
-
Method Details
-
createOp
Description copied from interface:DeleteDbRowOpFactoryCreates a delete op for a given object and target table.- Specified by:
createOpin interfaceDeleteDbRowOpFactory- Parameters:
object- the object being deletedentity- the target DbEntity (may be the root table or an additional / flattened table)id- the id of the row being deleted- Returns:
- a delete op
-