# Class BaseBatchTranslator<T extends BatchQuery>

java.lang.Object
org.apache.cayenne.access.translator.batch.BaseBatchTranslator<T>

Type Parameters:
  `T` - type of the batch query to translate

All Implemented Interfaces:
  `BatchTranslator<T>`

Direct Known Subclasses:
  `DeleteBatchTranslator, InsertBatchTranslator, UpdateBatchTranslator`

public abstract class BaseBatchTranslator<T extends BatchQuery> extends Object implements BatchTranslator<T>

Since:
  4.2

- ## Field Summary

  ### Fields inherited from interface BatchTranslator

  `DELETE, INSERT, UPDATE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseBatchTranslator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected ExpressionNodeBuilder`
  `buildQualifier(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, List<DbAttribute> attributeList)`
  `protected PSBatchParameter[]`
  `createBindings(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context)`
  `protected abstract int[]`
  `createRowValueIndexes(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context)`
  Returns, for each PreparedStatement placeholder in the order `createSql(BatchTranslatorContext)` emits them, the index of the `BatchQueryRow` value that feeds it.
  `protected abstract String`
  `createSql(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context)`
  `protected String`
  `doTranslate(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, NodeBuilder nodeBuilder)`
  `protected abstract boolean`
  `isNullAttribute(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, DbAttribute attribute)`
  `TranslatedBatch`
  `translate(T query, DbAdapter adapter)`
  Translates the provided batch query into an immutable `TranslatedBatch`.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### BaseBatchTranslator

    public BaseBatchTranslator()

- ## Method Details

  - ### translate

    public TranslatedBatch translate(T query, DbAdapter adapter)
    Description copied from interface: `BatchTranslator`
    Translates the provided batch query into an immutable `TranslatedBatch`.
    Specified by:
      `translate` in interface `BatchTranslator<T extends BatchQuery>`

  - ### createSql

    protected abstract String createSql(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context)

  - ### createBindings

    protected PSBatchParameter[] createBindings(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context)

  - ### createRowValueIndexes

    protected abstract int[] createRowValueIndexes(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context)
    Returns, for each PreparedStatement placeholder in the order `createSql(BatchTranslatorContext)` emits them, the index of the `BatchQueryRow` value that feeds it.

  - ### doTranslate

    protected String doTranslate(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, NodeBuilder nodeBuilder)

  - ### isNullAttribute

    protected abstract boolean isNullAttribute(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, DbAttribute attribute)

  - ### buildQualifier

    protected ExpressionNodeBuilder buildQualifier(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, List<DbAttribute> attributeList)