Package org.apache.cayenne.access.translator.batch

# 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 final String`
  `DEFAULT_DELETED_FIELD_NAME`
  Default name of 'deleted' field

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SoftDeleteTranslatorFactory()`
  `SoftDeleteTranslatorFactory(String deletedFieldName)`

- ## Method Summary

  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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_DELETED_FIELD_NAME

    public static final String DEFAULT_DELETED_FIELD_NAME
    Default name of 'deleted' field
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SoftDeleteTranslatorFactory

    public SoftDeleteTranslatorFactory()

  - ### SoftDeleteTranslatorFactory

    public SoftDeleteTranslatorFactory(String deletedFieldName)

- ## Method Details

  - ### deleteTranslator

    protected BatchTranslator deleteTranslator(DeleteBatchQuery query, DbAdapter adapter)
    Overrides:
      `deleteTranslator` in class `DefaultBatchTranslatorFactory`

  - ### getDeletedFieldName

    public String getDeletedFieldName()
    Returns:
      name of 'deleted' field