|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibatis.sqlmap.engine.execution.SqlExecutor
public class 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(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
Adds a statement to a batch |
void |
cleanup(SessionScope sessionScope)
Clean up any batches on the session |
int |
executeBatch(SessionScope sessionScope)
Execute a batch of statements |
java.util.List |
executeBatchDetailed(SessionScope sessionScope)
Execute a batch of statements |
void |
executeQuery(StatementScope statementScope,
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(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
Execute a stored procedure |
int |
executeUpdate(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
Execute an update |
int |
executeUpdateProcedure(StatementScope statementScope,
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(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
throws java.sql.SQLException
statementScope - - the request scopeconn - - the database connectionsql - - the sql statement to executeparameters - - the parameters for the sql statement
java.sql.SQLException - - if the update fails
public void addBatch(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
throws java.sql.SQLException
statementScope - - the request scopeconn - - the database connectionsql - - the sql statementparameters - - the parameters for the statement
java.sql.SQLException - - if the statement fails
public int executeBatch(SessionScope sessionScope)
throws java.sql.SQLException
sessionScope - - the session scope
java.sql.SQLException - - if a statement fails
public java.util.List executeBatchDetailed(SessionScope sessionScope)
throws java.sql.SQLException,
BatchException
sessionScope - - 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 BatchUpdateException
public void executeQuery(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
throws java.sql.SQLException
statementScope - - 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 fails
public int executeUpdateProcedure(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters)
throws java.sql.SQLException
statementScope - - the request scopeconn - - the database connectionsql - - the SQL to call the procedureparameters - - the parameters for the procedure
java.sql.SQLException - - if the procedure fails
public void executeQueryProcedure(StatementScope statementScope,
java.sql.Connection conn,
java.lang.String sql,
java.lang.Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
throws java.sql.SQLException
statementScope - - 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 sessionScope)
sessionScope - - the session to clean up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||