SoftDeleteTranslatorFactory (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.access.translator.batch, class: SoftDeleteTranslatorFactory

# 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 DefaultBatchTranslatorFactory

  `insertTranslator, translator, updateTranslator`
  Modifier and Type
  Method
  Description
  `protected BatchTranslator`
  `insertTranslator(InsertBatchQuery query, DbAdapter adapter)`
  `BatchTranslator`
  `translator(BatchQuery query, DbAdapter adapter, String trimFunction)`
  Creates a proper translator for a BatchQuery
  `protected BatchTranslator`
  `updateTranslator(UpdateBatchQuery query, DbAdapter adapter)`

  ### Methods inherited from class 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