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
  • 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)