Class SoftDeleteTranslatorFactory
- java.lang.Object
-
- org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory
-
- org.apache.cayenne.access.translator.batch.SoftDeleteTranslatorFactory
-
- All Implemented Interfaces:
BatchTranslatorFactory
public class SoftDeleteTranslatorFactory extends DefaultBatchTranslatorFactory
Implementation of {link #BatchTranslator}, which uses 'soft' delete (runs UPDATE and sets 'deleted' field to true instead-of running SQL DELETE)- Since:
- 4.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_DELETED_FIELD_NAME
Default name of 'deleted' field
-
Constructor Summary
Constructors Constructor Description SoftDeleteTranslatorFactory()
SoftDeleteTranslatorFactory(String deletedFieldName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BatchTranslator
deleteTranslator(DeleteBatchQuery query, DbAdapter adapter)
String
getDeletedFieldName()
-
Methods inherited from class org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory
insertTranslator, translator, updateTranslator
-
-
-
-
Field Detail
-
DEFAULT_DELETED_FIELD_NAME
public static final String DEFAULT_DELETED_FIELD_NAME
Default name of 'deleted' field- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SoftDeleteTranslatorFactory
public SoftDeleteTranslatorFactory()
-
SoftDeleteTranslatorFactory
public SoftDeleteTranslatorFactory(String deletedFieldName)
-
-
Method Detail
-
deleteTranslator
protected BatchTranslator deleteTranslator(DeleteBatchQuery query, DbAdapter adapter)
- Overrides:
deleteTranslator
in classDefaultBatchTranslatorFactory
-
getDeletedFieldName
public String getDeletedFieldName()
- Returns:
- name of 'deleted' field
-
-