|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibatis.sqlmap.engine.execution.SqlExecutor
Class responsible for executing the SQL
Field Summary | |
static int |
NO_MAXIMUM_RESULTS
Constant to let us know to include all records |
static int |
NO_SKIPPED_RESULTS
Constant to let us know not to skip anything |
Constructor Summary | |
SqlExecutor()
|
Method Summary | |
void |
addBatch(RequestScope request,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
Adds a statement to a batch |
void |
cleanup(SessionScope session)
Clean up any batches on the session |
int |
executeBatch(SessionScope session)
Execute a batch of statements |
java.util.List |
executeBatchDetailed(SessionScope session)
Execute a batch of statements |
void |
executeQuery(RequestScope request,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
Long form of the method to execute a query |
void |
executeQueryProcedure(RequestScope request,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
Execute a stored procedure |
int |
executeUpdate(RequestScope request,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
Execute an update |
int |
executeUpdateProcedure(RequestScope request,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
Execute a stored procedure that updates data |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NO_SKIPPED_RESULTS
public static final int NO_MAXIMUM_RESULTS
Constructor Detail |
public SqlExecutor()
Method Detail |
public int executeUpdate(RequestScope request, java.sql.Connection conn, java.lang.String sql, java.lang.Object[] parameters) throws java.sql.SQLException
request
- - the request scopeconn
- - the database connectionsql
- - the sql statement to executeparameters
- - the parameters for the sql statement
java.sql.SQLException
- - if the update failspublic void addBatch(RequestScope request, java.sql.Connection conn, java.lang.String sql, java.lang.Object[] parameters) throws java.sql.SQLException
request
- - the request scopeconn
- - the database connectionsql
- - the sql statementparameters
- - the parameters for the statement
java.sql.SQLException
- - if the statement failspublic int executeBatch(SessionScope session) throws java.sql.SQLException
session
- - the session scope
java.sql.SQLException
- - if a statement failspublic java.util.List executeBatchDetailed(SessionScope session) throws java.sql.SQLException, BatchException
session
- - the session scope
java.sql.SQLException
- if a database access error occurs, or the drive
does not support batch statements
BatchException
- if the driver throws BatchUpdateExceptionpublic void executeQuery(RequestScope request, java.sql.Connection conn, java.lang.String sql, java.lang.Object[] parameters, int skipResults, int maxResults, RowHandlerCallback callback) throws java.sql.SQLException
request
- - the request scopeconn
- - the database connectionsql
- - the SQL statement to executeparameters
- - the parameters for the statementskipResults
- - the number of results to skipmaxResults
- - the maximum number of results to returncallback
- - the row handler for the query
java.sql.SQLException
- - if the query failspublic int executeUpdateProcedure(RequestScope request, java.sql.Connection conn, java.lang.String sql, java.lang.Object[] parameters) throws java.sql.SQLException
request
- - the request scopeconn
- - the database connectionsql
- - the SQL to call the procedureparameters
- - the parameters for the procedure
java.sql.SQLException
- - if the procedure failspublic void executeQueryProcedure(RequestScope request, java.sql.Connection conn, java.lang.String sql, java.lang.Object[] parameters, int skipResults, int maxResults, RowHandlerCallback callback) throws java.sql.SQLException
request
- - the request scopeconn
- - the database connectionsql
- - the sql to call the procedureparameters
- - the parameters for the procedureskipResults
- - the number of results to skipmaxResults
- - the maximum number of results to returncallback
- - a row handler for processing the results
java.sql.SQLException
- - if the procedure failspublic void cleanup(SessionScope session)
session
- - the session to clean up
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |