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

# Class DefaultBatchTranslator

java.lang.Object
org.apache.cayenne.access.translator.batch.legacy.DefaultBatchTranslator

All Implemented Interfaces:
  `BatchTranslator`

@Deprecated(since="4.2") public abstract class DefaultBatchTranslator extends Object implements BatchTranslator
Deprecated.
since 4.2
Superclass of batch query translators.

Since:
  4.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected DbAdapter`
  `adapter`
  Deprecated.
  `protected DbAttributeBinding[]`
  `bindings`
  Deprecated.
  `protected BatchQuery`
  `query`
  Deprecated.
  `protected String`
  `sql`
  Deprecated.
  `protected boolean`
  `translated`
  Deprecated.
  `protected String`
  `trimFunction`
  Deprecated.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultBatchTranslator(BatchQuery query, DbAdapter adapter, String trimFunction)`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `appendDbAttribute(StringBuilder buf, DbAttribute dbAttribute)`
  Deprecated.
  Appends the name of the column to the query buffer.
  `protected abstract DbAttributeBinding[]`
  `createBindings()`
  Deprecated.
  `protected abstract String`
  `createSql()`
  Deprecated.
  `protected abstract DbAttributeBinding[]`
  `doUpdateBindings(BatchQueryRow row)`
  Deprecated.
  `protected void`
  `ensureTranslated()`
  Deprecated.
  `DbAttributeBinding[]`
  `getBindings()`
  Deprecated.
  Returns the widest possible array of bindings for this query.
  `String`
  `getSql()`
  Deprecated.
  Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.
  `DbAttributeBinding[]`
  `updateBindings(BatchQueryRow row)`
  Deprecated.
  Updates internal bindings to be used with a given row, returning updated bindings array.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### query

    protected BatchQuery query
    Deprecated.

  - ### adapter

    protected DbAdapter adapter
    Deprecated.

  - ### trimFunction

    protected String trimFunction
    Deprecated.

  - ### translated

    protected boolean translated
    Deprecated.

  - ### sql

    protected String sql
    Deprecated.

  - ### bindings

    protected DbAttributeBinding[] bindings
    Deprecated.

- ## Constructor Details

  - ### DefaultBatchTranslator

    public DefaultBatchTranslator(BatchQuery query, DbAdapter adapter, String trimFunction)
    Deprecated.

- ## Method Details

  - ### ensureTranslated

    protected void ensureTranslated()
    Deprecated.

  - ### getSql

    public String getSql()
    Deprecated.
    Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.
    Specified by:
      `getSql` in interface `BatchTranslator`

  - ### getBindings

    public DbAttributeBinding[] getBindings()
    Deprecated.
    Description copied from interface: `BatchTranslator`
    Returns the widest possible array of bindings for this query.
    Specified by:
      `getBindings` in interface `BatchTranslator`

  - ### updateBindings

    public DbAttributeBinding[] updateBindings(BatchQueryRow row)
    Deprecated.
    Description copied from interface: `BatchTranslator`
    Updates internal bindings to be used with a given row, returning updated bindings array. This method guarantees that the returned array contains the same bindings in the same order as in the array returned from `BatchTranslator.getBindings()` (but in a state corresponding to the 'row' parameter). Usually the returned array is actually the same object reused for every iteration, only with changed object state.
    Specified by:
      `updateBindings` in interface `BatchTranslator`

  - ### createSql

    protected abstract String createSql()
    Deprecated.

  - ### createBindings

    protected abstract DbAttributeBinding[] createBindings()
    Deprecated.

  - ### doUpdateBindings

    protected abstract DbAttributeBinding[] doUpdateBindings(BatchQueryRow row)
    Deprecated.

  - ### appendDbAttribute

    protected void appendDbAttribute(StringBuilder buf, DbAttribute dbAttribute)
    Deprecated.
    Appends the name of the column to the query buffer. Subclasses use this method to append column names in the WHERE clause, i.e. for the columns that are not being updated.