org.apache.commons.dbutils
Class AsyncQueryRunner.BatchCallableStatement
java.lang.Object
org.apache.commons.dbutils.AsyncQueryRunner.BatchCallableStatement
- All Implemented Interfaces:
- Callable<int[]>
- Enclosing class:
- AsyncQueryRunner
protected class AsyncQueryRunner.BatchCallableStatement
- extends Object
- implements Callable<int[]>
Class that encapsulates the continuation for batch calls.
Method Summary |
int[] |
call()
The actual call to executeBatch. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncQueryRunner.BatchCallableStatement
public AsyncQueryRunner.BatchCallableStatement(String sql,
Object[][] params,
Connection conn,
boolean closeConn,
PreparedStatement ps)
- Creates a new BatchCallableStatement instance.
- Parameters:
sql
- The SQL statement to execute.params
- An array of query replacement parameters. Each row in
this array is one set of batch replacement values.conn
- The connection to use for the batch call.closeConn
- True if the connection should be closed, false otherwise.ps
- The PreparedStatement
to be executed.
call
public int[] call()
throws SQLException
- The actual call to executeBatch.
- Specified by:
call
in interface Callable<int[]>
- Returns:
- an array of update counts containing one element for each command in the batch.
- Throws:
SQLException
- if a database access error occurs or one of the commands sent to the database fails.- See Also:
Statement.executeBatch()
Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.