org.apache.cayenne.access.jdbc

## Class SoftDeleteQueryBuilderFactory

- java.lang.Object
- - org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory
  - - org.apache.cayenne.access.jdbc.SoftDeleteQueryBuilderFactory

- All Implemented Interfaces:
    BatchQueryBuilderFactory

      public class SoftDeleteQueryBuilderFactory
      extends DefaultBatchQueryBuilderFactory

  Implementation of `#BatchQueryBuilderFactory`, which uses 'soft' delete (runs UPDATE and sets 'deleted' field to true instead-of running SQL DELETE)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_DELETED_FIELD_NAME` Default name of 'deleted' field

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoftDeleteQueryBuilderFactory()`
    `SoftDeleteQueryBuilderFactory(String deletedFieldName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BatchQueryBuilder` | `createDeleteQueryBuilder(DbAdapter adapter)` Creates query builder for DELETE queries
    `String` | `getDeletedFieldName()`

    - ### Methods inherited from class org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory

      `createInsertQueryBuilder, createUpdateQueryBuilder`

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

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

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

    - #### SoftDeleteQueryBuilderFactory

          public SoftDeleteQueryBuilderFactory()

    - #### SoftDeleteQueryBuilderFactory

          public SoftDeleteQueryBuilderFactory(String deletedFieldName)

  - ### Method Detail

    - #### createDeleteQueryBuilder

          public BatchQueryBuilder createDeleteQueryBuilder(DbAdapter adapter)

      Description copied from interface: `BatchQueryBuilderFactory`
      Creates query builder for DELETE queries
      Specified by:
        `createDeleteQueryBuilder` in interface `BatchQueryBuilderFactory`
      Overrides:
        `createDeleteQueryBuilder` in class `DefaultBatchQueryBuilderFactory`

    - #### getDeletedFieldName

          public String getDeletedFieldName()

      Returns:
        name of 'deleted' field

Copyright © 2001–2014 Apache Cayenne. All rights reserved.