org.apache.cayenne.access.trans
Class DeleteBatchQueryBuilder

java.lang.Object
  extended by org.apache.cayenne.access.trans.BatchQueryBuilder
      extended by org.apache.cayenne.access.trans.DeleteBatchQueryBuilder
Direct Known Subclasses:
SoftDeleteBatchQueryBuilder

public class DeleteBatchQueryBuilder
extends BatchQueryBuilder

Translator for delete BatchQueries. Creates parametrized DELETE SQL statements.


Field Summary
 
Fields inherited from class org.apache.cayenne.access.trans.BatchQueryBuilder
adapter, trimFunction
 
Constructor Summary
DeleteBatchQueryBuilder(DbAdapter adapter)
           
 
Method Summary
protected  void applyQualifier(StringBuffer query, BatchQuery batch)
          Appends WHERE clause to SQL string
 void bindParameters(PreparedStatement statement, BatchQuery query)
          Binds BatchQuery parameters to the PreparedStatement.
 String createSqlString(BatchQuery batch)
          Translates BatchQuery into an SQL string formatted to use in a PreparedStatement.
protected  int getFirstParameterIndex(BatchQuery query)
           
 
Methods inherited from class org.apache.cayenne.access.trans.BatchQueryBuilder
appendDbAttribute, getAdapter, getParameterValues, getTrimFunction, setAdapter, setTrimFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteBatchQueryBuilder

public DeleteBatchQueryBuilder(DbAdapter adapter)
Method Detail

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

applyQualifier

protected void applyQualifier(StringBuffer query,
                              BatchQuery batch)
Appends WHERE clause to SQL string


bindParameters

public void bindParameters(PreparedStatement statement,
                           BatchQuery query)
                    throws SQLException,
                           Exception
Binds BatchQuery parameters to the PreparedStatement.

Overrides:
bindParameters in class BatchQueryBuilder
Throws:
SQLException
Exception

getFirstParameterIndex

protected int getFirstParameterIndex(BatchQuery query)
Returns:
index of first parameter in delete clause


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