Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access.jdbc
Class SoftDeleteBatchQueryBuilder

    java.lang.Object
      org.apache.cayenne.access.trans.BatchQueryBuilder
          org.apache.cayenne.access.trans.DeleteBatchQueryBuilder
              org.apache.cayenne.access.jdbc.SoftDeleteBatchQueryBuilder

    public class SoftDeleteBatchQueryBuilder

extends DeleteBatchQueryBuilder

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

Field Summary

Fields inherited from class org.apache.cayenne.access.trans.BatchQueryBuilder
`adapter, trimFunction`

Constructor Summary
`SoftDeleteBatchQueryBuilder(DbAdapter adapter, String deletedFieldName)`

Method Summary
`void` | `bindParameters(PreparedStatement statement, BatchQuery query)` Binds BatchQuery parameters to the PreparedStatement.
`String` | `createSqlString(BatchQuery batch)` Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.
`protected int` | `getFirstParameterIndex(BatchQuery query)`
`protected boolean` | `needSoftDelete(BatchQuery query)`

Methods inherited from class org.apache.cayenne.access.trans.DeleteBatchQueryBuilder
`applyQualifier`

Methods inherited from class org.apache.cayenne.access.trans.BatchQueryBuilder
`appendDbAttribute, getAdapter, getParameterValues, getTrimFunction, setAdapter, setTrimFunction`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SoftDeleteBatchQueryBuilder

    public SoftDeleteBatchQueryBuilder(DbAdapter adapter,
                                       String deletedFieldName)

Method Detail

### createSqlString

    public String createSqlString(BatchQuery batch)
                           throws IOException

  Description copied from class: `BatchQueryBuilder`
  Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.

  Overrides:
    `createSqlString` in class `DeleteBatchQueryBuilder`
  Throws:
    `IOException`

### getFirstParameterIndex

    protected int getFirstParameterIndex(BatchQuery query)

  Overrides:
    `getFirstParameterIndex` in class `DeleteBatchQueryBuilder`
  Returns:
    index of first parameter in delete clause

### bindParameters

    public void bindParameters(PreparedStatement statement,
                               BatchQuery query)
                        throws SQLException,
                               Exception

  Description copied from class: `DeleteBatchQueryBuilder`
  Binds BatchQuery parameters to the PreparedStatement.

  Overrides:
    `bindParameters` in class `DeleteBatchQueryBuilder`
  Throws:
    `SQLException`
    `Exception`

### needSoftDelete

    protected boolean needSoftDelete(BatchQuery query)

  Returns:
    whether 'soft' deletion should be used

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.