public class SqlExecutor extends Object implements com.ibatis.sqlmap.engine.execution.SqlExecutor, com.ibatis.common.Statsable
Date: 2011-11-15,22:37:47 +0800
| Modifier and Type | Class and Description |
|---|---|
static class |
SqlExecutor.SqlStat |
| Constructor and Description |
|---|
SqlExecutor() |
| Modifier and Type | Method and Description |
|---|---|
int |
addBatch(com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
Adds a statement to a batch
|
void |
cleanup(com.ibatis.sqlmap.engine.scope.SessionScope sessionScope)
Clean up any batches on the session
|
int |
executeBatch(com.ibatis.sqlmap.engine.scope.SessionScope sessionScope)
Execute a batch of statements
|
List<BatchResult> |
executeBatchDetailed(com.ibatis.sqlmap.engine.scope.SessionScope sessionScope)
Execute a batch of statements
|
<T> T |
executeInsert(String id,
com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
com.ibatis.sqlmap.engine.mapping.result.ResultMap keyResultMap)
Execute an insert
|
void |
executeQuery(String id,
com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skip,
int max,
com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback callback)
Long form of the method to execute a query
|
void |
executeQueryPage(String id,
com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skip,
int max,
com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback callback,
PageHandler pageHandler)
Long form of the method to execute a query
|
void |
executeQueryProcedure(String id,
com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skip,
int max,
com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback callback)
Execute a stored procedure
|
int |
executeUpdate(String id,
com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
Execute an update
|
int |
executeUpdateProcedure(String id,
com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
Execute a stored procedure that updates data
|
String |
getStatus(String h) |
void |
init(com.ibatis.sqlmap.engine.config.SqlMapConfiguration config,
Properties globalProps)
Initializing SQL Executor by passing configuration and global properties.
|
boolean |
isCheckSql() |
boolean |
isDebugSql() |
boolean |
isTraceSql() |
public int executeUpdate(String id, com.ibatis.sqlmap.engine.scope.StatementScope statementScope, Connection conn, String sql, Object[] parameters) throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteUpdate in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the sql statement to executeparameters - - the parameters for the sql statementSQLException - - if the update failspublic <T> T executeInsert(String id, com.ibatis.sqlmap.engine.scope.StatementScope statementScope, Connection conn, String sql, Object[] parameters, com.ibatis.sqlmap.engine.mapping.result.ResultMap keyResultMap) throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteInsert in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopesql - - the sql statement to executeparameters - - the parameters for the sql statementSQLException - - if the insert failspublic int addBatch(com.ibatis.sqlmap.engine.scope.StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutoraddBatch in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the sql statementparameters - - the parameters for the statementSQLException - - if the statement failspublic int executeBatch(com.ibatis.sqlmap.engine.scope.SessionScope sessionScope)
throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteBatch in interface com.ibatis.sqlmap.engine.execution.SqlExecutorsessionScope - - the session scopeSQLException - - if a statement failspublic List<BatchResult> executeBatchDetailed(com.ibatis.sqlmap.engine.scope.SessionScope sessionScope) throws SQLException, com.ibatis.sqlmap.engine.execution.BatchException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteBatchDetailed in interface com.ibatis.sqlmap.engine.execution.SqlExecutorsessionScope - - the session scopeSQLException - if a database access error occurs, or the drive does not support batch statementscom.ibatis.sqlmap.engine.execution.BatchException - if the driver throws BatchUpdateExceptionpublic void executeQuery(String id, com.ibatis.sqlmap.engine.scope.StatementScope statementScope, Connection conn, String sql, Object[] parameters, int skip, int max, com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback callback) throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteQuery in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the SQL statement to executeparameters - - the parameters for the statementskip - - the number of results to skipmax - - the maximum number of results to returncallback - - the row handler for the querySQLException - - if the query failspublic void executeQueryPage(String id, com.ibatis.sqlmap.engine.scope.StatementScope statementScope, Connection conn, String sql, Object[] parameters, int skip, int max, com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback callback, PageHandler pageHandler) throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteQueryPage in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the SQL statement to executeparameters - - the parameters for the statementskip - - the number of results to skipmax - - the maximum number of results to returncallback - - the row handler for the querypageHandler - - the page handler for the querySQLException - - if the query failspublic int executeUpdateProcedure(String id, com.ibatis.sqlmap.engine.scope.StatementScope statementScope, Connection conn, String sql, Object[] parameters) throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteUpdateProcedure in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the SQL to call the procedureparameters - - the parameters for the procedureSQLException - - if the procedure failspublic void executeQueryProcedure(String id, com.ibatis.sqlmap.engine.scope.StatementScope statementScope, Connection conn, String sql, Object[] parameters, int skip, int max, com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback callback) throws SQLException
com.ibatis.sqlmap.engine.execution.SqlExecutorexecuteQueryProcedure in interface com.ibatis.sqlmap.engine.execution.SqlExecutorstatementScope - - the request scopeconn - - the database connectionsql - - the sql to call the procedureparameters - - the parameters for the procedureskip - - the number of results to skipmax - - the maximum number of results to returncallback - - a row handler for processing the resultsSQLException - - if the procedure failspublic void cleanup(com.ibatis.sqlmap.engine.scope.SessionScope sessionScope)
com.ibatis.sqlmap.engine.execution.SqlExecutorcleanup in interface com.ibatis.sqlmap.engine.execution.SqlExecutorsessionScope - - the session to clean uppublic void init(com.ibatis.sqlmap.engine.config.SqlMapConfiguration config,
Properties globalProps)
com.ibatis.sqlmap.engine.execution.SqlExecutorinit in interface com.ibatis.sqlmap.engine.execution.SqlExecutorconfig - - the configuration class, which contains complete configuration infopublic boolean isTraceSql()
isTraceSql in interface com.ibatis.sqlmap.engine.execution.SqlExecutorpublic boolean isCheckSql()
isCheckSql in interface com.ibatis.sqlmap.engine.execution.SqlExecutorpublic boolean isDebugSql()
isDebugSql in interface com.ibatis.sqlmap.engine.execution.SqlExecutorCopyright © 2084–2018 dukeware.com. All rights reserved.