public abstract class DefaultBatchTranslator extends Object implements BatchTranslator
| Modifier and Type | Field and Description |
|---|---|
protected DbAdapter |
adapter |
protected BatchParameterBinding[] |
bindings |
protected BatchQuery |
query |
protected String |
sql |
protected boolean |
translated |
protected String |
trimFunction |
| Constructor and Description |
|---|
DefaultBatchTranslator(BatchQuery query,
DbAdapter adapter,
String trimFunction) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendDbAttribute(StringBuilder buf,
DbAttribute dbAttribute)
Appends the name of the column to the query buffer.
|
protected abstract BatchParameterBinding[] |
createBindings() |
protected abstract String |
createSql() |
protected abstract BatchParameterBinding[] |
doUpdateBindings(BatchQueryRow row) |
protected void |
ensureTranslated() |
BatchParameterBinding[] |
getBindings()
Returns the widest possible array of bindings for this query.
|
String |
getSql()
Translates BatchQuery into an SQL string formatted to use in a
PreparedStatement.
|
BatchParameterBinding[] |
updateBindings(BatchQueryRow row)
Updates internal bindings to be used with a given row, returning updated
bindings array.
|
protected BatchQuery query
protected DbAdapter adapter
protected String trimFunction
protected boolean translated
protected String sql
protected BatchParameterBinding[] bindings
public DefaultBatchTranslator(BatchQuery query, DbAdapter adapter, String trimFunction)
protected void ensureTranslated()
public String getSql()
getSql in interface BatchTranslatorpublic BatchParameterBinding[] getBindings()
BatchTranslatorgetBindings in interface BatchTranslatorpublic BatchParameterBinding[] updateBindings(BatchQueryRow row)
BatchTranslatorBatchTranslator.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.updateBindings in interface BatchTranslatorprotected abstract String createSql()
protected abstract BatchParameterBinding[] createBindings()
protected abstract BatchParameterBinding[] doUpdateBindings(BatchQueryRow row)
protected void appendDbAttribute(StringBuilder buf, DbAttribute dbAttribute)
Copyright © 2001–2015 Apache Cayenne. All rights reserved.