|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibatis.sqlmap.engine.execution.DefaultSqlExecutor
public class DefaultSqlExecutor
Class responsible for executing the SQL
| Field Summary |
|---|
| Fields inherited from interface com.ibatis.sqlmap.engine.execution.SqlExecutor |
|---|
NO_MAXIMUM_RESULTS, NO_SKIPPED_RESULTS |
| Constructor Summary | |
|---|---|
DefaultSqlExecutor()
|
|
| Method Summary | |
|---|---|
void |
addBatch(StatementScope statementScope,
Connection conn,
String sql,
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 |
List |
executeBatchDetailed(SessionScope sessionScope)
Execute a batch of statements |
void |
executeQuery(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
Long form of the method to execute a query |
void |
executeQueryProcedure(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
Execute a stored procedure |
int |
executeUpdate(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
Execute an update |
int |
executeUpdateProcedure(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
Execute a stored procedure that updates data |
void |
init(SqlMapConfiguration config,
Properties globalProps)
Initializing SQL Executor by passing configuration and global properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSqlExecutor()
| Method Detail |
|---|
public int executeUpdate(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
executeUpdate in interface SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the sql statement to executeparameters - - the parameters for the sql statement
SQLException - - if the update fails
public void addBatch(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
addBatch in interface SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the sql statementparameters - - the parameters for the statement
SQLException - - if the statement fails
public int executeBatch(SessionScope sessionScope)
throws SQLException
executeBatch in interface SqlExecutorsessionScope - - the session scope
SQLException - - if a statement fails
public List executeBatchDetailed(SessionScope sessionScope)
throws SQLException,
BatchException
executeBatchDetailed in interface SqlExecutorsessionScope - - the session scope
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,
Connection conn,
String sql,
Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
throws SQLException
executeQuery in interface SqlExecutorstatementScope - - 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
SQLException - - if the query fails
public int executeUpdateProcedure(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
executeUpdateProcedure in interface SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the SQL to call the procedureparameters - - the parameters for the procedure
SQLException - - if the procedure fails
public void executeQueryProcedure(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
throws SQLException
executeQueryProcedure in interface SqlExecutorstatementScope - - 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
SQLException - - if the procedure fails
public void init(SqlMapConfiguration config,
Properties globalProps)
SqlExecutor
init in interface SqlExecutorconfig - - the configuration class, which contains complete configuration infopublic void cleanup(SessionScope sessionScope)
cleanup in interface SqlExecutorsessionScope - - the session to clean up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||