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:
java.util.concurrent.Callable<T>
- Enclosing class:
- AsyncQueryRunner
protected class AsyncQueryRunner.QueryCallableStatement<T> extends java.lang.Object implements java.util.concurrent.Callable<T>
Class that encapsulates the continuation for query calls.
-
-
Constructor Summary
Constructors Constructor Description QueryCallableStatement(java.sql.Connection conn, boolean closeConn, java.sql.PreparedStatement ps, ResultSetHandler<T> rsh, java.lang.String sql, java.lang.Object... params)
Creates a newQueryCallableStatement
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
call()
The actual call tohandle()
method.
-
-
-
Field Detail
-
sql
private final java.lang.String sql
-
params
private final java.lang.Object[] params
-
conn
private final java.sql.Connection conn
-
closeConn
private final boolean closeConn
-
ps
private final java.sql.PreparedStatement ps
-
rsh
private final ResultSetHandler<T> rsh
-
-
Constructor Detail
-
QueryCallableStatement
public QueryCallableStatement(java.sql.Connection conn, boolean closeConn, java.sql.PreparedStatement ps, ResultSetHandler<T> rsh, java.lang.String sql, java.lang.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 java.sql.SQLException
The actual call tohandle()
method.- Specified by:
call
in interfacejava.util.concurrent.Callable<T>
- Returns:
- an array of update counts containing one element for each command in the batch.
- Throws:
java.sql.SQLException
- if a database access error occurs.- See Also:
ResultSetHandler.handle(ResultSet)
-
-