Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access.trans
Class BatchQueryBuilder

    java.lang.Object
      org.apache.cayenne.access.trans.BatchQueryBuilder

Direct Known Subclasses:
  DeleteBatchQueryBuilder, InsertBatchQueryBuilder, LOBBatchQueryBuilder, UpdateBatchQueryBuilder

    public abstract class BatchQueryBuilder

extends java.lang.Object

Superclass of batch query translators.

Field Summary
`protected DbAdapter` | `adapter`
`protected java.lang.String` | `trimFunction`

Constructor Summary
`BatchQueryBuilder()` Deprecated. since 3.1 unused
`BatchQueryBuilder(DbAdapter adapter)`

Method Summary
`protected void` | `appendDbAttribute(java.lang.StringBuffer buf, DbAttribute dbAttribute)` Appends the name of the column to the query buffer.
`void` | `bindParameters(java.sql.PreparedStatement statement, BatchQuery query)` Binds parameters for the current batch iteration to the PreparedStatement.
`abstract java.lang.String` | `createSqlString(BatchQuery batch)` Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.
`DbAdapter` | `getAdapter()`
`java.util.List<java.lang.Object>` | `getParameterValues(BatchQuery query)` Returns a list of values for the current batch iteration.
`java.lang.String` | `getTrimFunction()`
`void` | `setAdapter(DbAdapter adapter)`
`void` | `setTrimFunction(java.lang.String string)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### adapter

    protected DbAdapter adapter

### trimFunction

    protected java.lang.String trimFunction

Constructor Detail

### BatchQueryBuilder

    public BatchQueryBuilder()

  Deprecated. since 3.1 unused

### BatchQueryBuilder

    public BatchQueryBuilder(DbAdapter adapter)

Method Detail

### createSqlString

    public abstract java.lang.String createSqlString(BatchQuery batch)
                                              throws java.io.IOException

  Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.

  Throws:
    `java.io.IOException`

### appendDbAttribute

    protected void appendDbAttribute(java.lang.StringBuffer buf,
                                     DbAttribute dbAttribute)

  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.

### setAdapter

    public void setAdapter(DbAdapter adapter)

### getAdapter

    public DbAdapter getAdapter()

### getTrimFunction

    public java.lang.String getTrimFunction()

### setTrimFunction

    public void setTrimFunction(java.lang.String string)

### bindParameters

    public void bindParameters(java.sql.PreparedStatement statement,
                               BatchQuery query)
                        throws java.sql.SQLException,
                               java.lang.Exception

  Binds parameters for the current batch iteration to the PreparedStatement.

  Throws:
    `java.sql.SQLException`
    `java.lang.Exception`
  Since:
    1.2

### getParameterValues

    public java.util.List<java.lang.Object> getParameterValues(BatchQuery query)

  Returns a list of values for the current batch iteration. Used primarily for logging.

  Since:
    1.2

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.