Package org.apache.commons.dbutils
Class AsyncQueryRunner.QueryCallableStatement<T>
- java.lang.Object
-
- org.apache.commons.dbutils.AsyncQueryRunner.QueryCallableStatement<T>
-
- Type Parameters:
T
- The type of the result from the call to handle.
- All Implemented Interfaces:
Callable<T>
- Enclosing class:
- AsyncQueryRunner
protected class AsyncQueryRunner.QueryCallableStatement<T> extends Object implements Callable<T>
Class that encapsulates the continuation for query calls.
-
-
Constructor Summary
Constructors Constructor Description QueryCallableStatement(Connection conn, boolean closeConn, PreparedStatement ps, ResultSetHandler<T> rsh, String sql, Object... params)
Creates a newQueryCallableStatement
instance.
-
-
-
Constructor Detail
-
QueryCallableStatement
public QueryCallableStatement(Connection conn, boolean closeConn, PreparedStatement ps, ResultSetHandler<T> rsh, String sql, Object... params)
Creates a newQueryCallableStatement
instance.- Parameters:
conn
- The connection to use for the batch call.closeConn
- True if the connection should be closed, false otherwise.ps
- ThePreparedStatement
to be executed.rsh
- The handler that converts the results into an object.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.
-
-
Method Detail
-
call
public T call() throws SQLException
The actual call tohandle()
method.- Specified by:
call
in interfaceCallable<T>
- Returns:
- an array of update counts containing one element for each command in the batch.
- Throws:
SQLException
- if a database access error occurs.- See Also:
ResultSetHandler.handle(ResultSet)
-
-