|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SqlExecutor
Classes responsible for executing the SQL implement this interface Support for custom SQL Executors.
| 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 |
| 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. |
| Field Detail |
|---|
static final int NO_SKIPPED_RESULTS
static final int NO_MAXIMUM_RESULTS
| Method Detail |
|---|
int executeUpdate(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
statementScope - - the request scopeconn - - the database connectionsql - - the sql statement to executeparameters - - the parameters for the sql statement
SQLException - - if the update fails
void addBatch(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
statementScope - - the request scopeconn - - the database connectionsql - - the sql statementparameters - - the parameters for the statement
SQLException - - if the statement fails
int executeBatch(SessionScope sessionScope)
throws SQLException
sessionScope - - the session scope
SQLException - - if a statement fails
List executeBatchDetailed(SessionScope sessionScope)
throws SQLException,
BatchException
sessionScope - - the session scope
SQLException - if a database access error occurs, or the drive
does not support batch statements
BatchException - if the driver throws BatchUpdateException
void executeQuery(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
throws 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
SQLException - - if the query fails
int executeUpdateProcedure(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters)
throws SQLException
statementScope - - the request scopeconn - - the database connectionsql - - the SQL to call the procedureparameters - - the parameters for the procedure
SQLException - - if the procedure fails
void executeQueryProcedure(StatementScope statementScope,
Connection conn,
String sql,
Object[] parameters,
int skipResults,
int maxResults,
RowHandlerCallback callback)
throws 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
SQLException - - if the procedure failsvoid cleanup(SessionScope sessionScope)
sessionScope - - the session to clean up
void init(SqlMapConfiguration config,
Properties globalProps)
config - - the configuration class, which contains complete configuration infoglobalProps -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||