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 org.apache.cayenne.access.translator.BatchTranslator
DELETE, INSERT, UPDATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ExpressionNodeBuilderbuildQualifier(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 ordercreateSql(BatchTranslatorContext)emits them, the index of theBatchQueryRowvalue that feeds it.protected abstract Stringprotected StringdoTranslate(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, NodeBuilder nodeBuilder) protected abstract booleanisNullAttribute(org.apache.cayenne.access.translator.batch.BatchTranslatorContext<T> context, DbAttribute attribute) Translates the provided batch query into an immutableTranslatedBatch.
-
Constructor Details
-
BaseBatchTranslator
public BaseBatchTranslator()
-
-
Method Details
-
translate
Description copied from interface:BatchTranslatorTranslates the provided batch query into an immutableTranslatedBatch.- Specified by:
translatein interfaceBatchTranslator<T extends BatchQuery>
-
createSql
-
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 ordercreateSql(BatchTranslatorContext)emits them, the index of theBatchQueryRowvalue 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)
-