org.apache.cayenne.access.trans
Class InsertBatchQueryBuilder

java.lang.Object
  extended by org.apache.cayenne.access.trans.BatchQueryBuilder
      extended by org.apache.cayenne.access.trans.InsertBatchQueryBuilder

public class InsertBatchQueryBuilder
extends BatchQueryBuilder

Translator of InsertBatchQueries.


Field Summary
 
Fields inherited from class org.apache.cayenne.access.trans.BatchQueryBuilder
adapter, trimFunction
 
Constructor Summary
InsertBatchQueryBuilder(DbAdapter adapter)
           
 
Method Summary
 void bindParameters(PreparedStatement statement, BatchQuery query)
          Binds parameters for the current batch iteration to the PreparedStatement.
 String createSqlString(BatchQuery batch)
          Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.
 List<Object> getParameterValues(BatchQuery query)
          Returns a list of values for the current batch iteration.
protected  boolean includeInBatch(DbAttribute attribute)
          Returns true if an attribute should be included in the batch.
 
Methods inherited from class org.apache.cayenne.access.trans.BatchQueryBuilder
appendDbAttribute, getAdapter, getTrimFunction, setAdapter, setTrimFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertBatchQueryBuilder

public InsertBatchQueryBuilder(DbAdapter adapter)
Method Detail

bindParameters

public void bindParameters(PreparedStatement statement,
                           BatchQuery query)
                    throws SQLException,
                           Exception
Binds parameters for the current batch iteration to the PreparedStatement. Performs filtering of attributes based on column generation rules.

Overrides:
bindParameters in class BatchQueryBuilder
Throws:
SQLException
Exception
Since:
1.2

getParameterValues

public List<Object> getParameterValues(BatchQuery query)
Returns a list of values for the current batch iteration. Performs filtering of attributes based on column generation rules. Used primarily for logging.

Overrides:
getParameterValues in class BatchQueryBuilder
Since:
1.2

createSqlString

public String createSqlString(BatchQuery batch)
                       throws IOException
Description copied from class: BatchQueryBuilder
Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.

Specified by:
createSqlString in class BatchQueryBuilder
Throws:
IOException

includeInBatch

protected boolean includeInBatch(DbAttribute attribute)
Returns true if an attribute should be included in the batch.

Since:
1.2


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