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 Object

Superclass of batch query translators.

Author:
  Andriy Shapochka, Andrus Adamchik

Field Summary
`protected DbAdapter` | `adapter`
`protected String` | `trimFunction`

Constructor Summary
`BatchQueryBuilder()`
`BatchQueryBuilder(DbAdapter adapter)`

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

Constructor Detail

### BatchQueryBuilder

    public BatchQueryBuilder()

### BatchQueryBuilder

    public BatchQueryBuilder(DbAdapter adapter)

Method Detail

### createSqlString

    public abstract String createSqlString(BatchQuery batch)

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

### appendDbAttribute

    protected void appendDbAttribute(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 String getTrimFunction()

### setTrimFunction

    public void setTrimFunction(String string)

### bindParameters

    public void bindParameters(PreparedStatement statement,
                               BatchQuery query)
                        throws SQLException,
                               Exception

  Binds parameters for the current batch iteration to the PreparedStatement.

  Throws:
    `SQLException`
    `Exception`
  Since:
    1.2

### getParameterValues

    public List 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-2007 Apache Cayenne. All Rights Reserved.