|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QueryRunnerService
Core Service of Midao. Executes all type of Queries.
Method Summary | ||
---|---|---|
int[] |
batch(InputHandler[] inputHandlers)
Execute a batch of SQL INSERT, UPDATE, or DELETE queries. |
|
int[] |
batch(java.lang.String sql,
java.lang.Object[][] params)
Execute a batch of SQL INSERT, UPDATE, or DELETE queries. |
|
|
call(AbstractNamedInputHandler<T> inputHandler)
Executes the given CALL SQL statement. |
|
|
call(AbstractNamedInputHandler<T> inputHandler,
java.lang.String catalog,
java.lang.String schema,
boolean useCache)
Executes the given CALL SQL statement. |
|
QueryParameters |
call(AbstractQueryInputHandler inputHandler)
Executes the given CALL SQL statement. |
|
|
call(InputHandler<T> inputHandler,
OutputHandler<S> outputHandler)
Executes the given CALL SQL statement. |
|
|
call(InputHandler<T> inputHandler,
OutputHandler<S> outputHandler,
java.lang.String catalog,
java.lang.String schema,
boolean useCache)
Executes the given CALL SQL statement. |
|
void |
commit()
Commits current Transaction Usable only when setTransactionManualMode(boolean) set as true |
|
java.lang.Integer |
getTransactionIsolationLevel()
Returns current Transaction Isolation level |
|
boolean |
isTransactionManualMode()
Returns current Transaction mode |
|
QueryRunnerService |
override(java.lang.String operation,
java.lang.Object value)
Adds override which would be used until removed. |
|
QueryRunnerService |
overrideOnce(java.lang.String operation,
java.lang.Object value)
Adds override which would be used only once. |
|
|
query(InputHandler inputHandler,
OutputHandler<T> outputHandler)
Executes the given SELECT SQL query and returns a result object. |
|
|
query(java.lang.String sql,
OutputHandler<T> outputHandler)
Executes the given SELECT SQL without any replacement parameters. |
|
|
query(java.lang.String sql,
OutputHandler<T> outputHandler,
java.lang.Object... params)
Executes the given SELECT SQL query and returns a result object. |
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
Removes the specified Savepoint and subsequent Savepoint objects from the current transaction. |
|
QueryRunnerService |
removeOverride(java.lang.String operation)
Removes override. |
|
void |
rollback()
Rollbacks current Transaction Usable only when setTransactionManualMode(boolean) set as true |
|
void |
rollback(java.sql.Savepoint savepoint)
Undoes all changes made after the given Savepoint object was set. |
|
java.sql.Savepoint |
setSavepoint()
Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it. |
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it. |
|
void |
setTransactionIsolationLevel(java.lang.Integer level)
Transaction Isolation level. |
|
void |
setTransactionManualMode(boolean manualMode)
Sets Transaction mode. |
|
int |
update(InputHandler inputHandler)
Executes the given INSERT, UPDATE, or DELETE SQL statement. |
|
|
update(InputHandler inputHandler,
OutputHandler<T> outputHandler)
Executes the given INSERT, UPDATE, or DELETE SQL statement. |
|
int |
update(java.lang.String sql)
Executes the given INSERT, UPDATE, or DELETE SQL statement without any replacement parameters. |
|
int |
update(java.lang.String sql,
java.lang.Object... params)
Executes the given INSERT, UPDATE, or DELETE SQL statement. |
|
int |
update(java.lang.String sql,
java.lang.Object param)
Executes the given INSERT, UPDATE, or DELETE SQL statement with a single replacement parameter. |
|
|
update(java.lang.String sql,
OutputHandler<T> outputHandler,
java.lang.Object... params)
Executes the given INSERT, UPDATE, or DELETE SQL statement. |
Method Detail |
---|
int[] batch(java.lang.String sql, java.lang.Object[][] params) throws java.sql.SQLException
sql
- The SQL to execute.params
- An array of query replacement parameters. Each row in
this array is one set of batch replacement values.
java.sql.SQLException
- if exception would be thrown by Driver/Databaseint[] batch(InputHandler[] inputHandlers) throws java.sql.SQLException
inputHandlers
- Input Handler which would be executed
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T query(java.lang.String sql, OutputHandler<T> outputHandler, java.lang.Object... params) throws java.sql.SQLException
T
- The type of object that the handler returnssql
- The SQL statement to execute.outputHandler
- The handler used to create the result object from Query outputparams
- Initialize the PreparedStatement's IN parameters with this array.
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T query(InputHandler inputHandler, OutputHandler<T> outputHandler) throws java.sql.SQLException
T
- The type of object that the handler returnsinputHandler
- Input Handler which would be executedoutputHandler
- The handler used to create the result object from Query output
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T query(java.lang.String sql, OutputHandler<T> outputHandler) throws java.sql.SQLException
T
- The type of object that the handler returnssql
- The SQL statement to execute.outputHandler
- The handler used to create the result object from Query output
java.sql.SQLException
- if exception would be thrown by Driver/Databaseint update(java.lang.String sql) throws java.sql.SQLException
sql
- The SQL statement to execute.
java.sql.SQLException
- if exception would be thrown by Driver/Databaseint update(java.lang.String sql, java.lang.Object param) throws java.sql.SQLException
sql
- The SQL statement to execute.param
- The replacement parameter.
java.sql.SQLException
- if exception would be thrown by Driver/Databaseint update(java.lang.String sql, java.lang.Object... params) throws java.sql.SQLException
sql
- The SQL statement to execute.params
- Initializes the PreparedStatement's IN (i.e. '?') parameters.
java.sql.SQLException
- if exception would be thrown by Driver/Databaseint update(InputHandler inputHandler) throws java.sql.SQLException
inputHandler
- Input Handler which would be executed
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T update(InputHandler inputHandler, OutputHandler<T> outputHandler) throws java.sql.SQLException
T
- The type of object that the handler returnsinputHandler
- Input Handler which would be executedoutputHandler
- The handler used to create the result object from Query output
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T update(java.lang.String sql, OutputHandler<T> outputHandler, java.lang.Object... params) throws java.sql.SQLException
T
- The type of object that the handler returnssql
- The SQL statement to execute.outputHandler
- The handler used to create the result object from Query outputparams
- Initializes the PreparedStatement's IN (i.e. '?') parameters.
java.sql.SQLException
- if exception would be thrown by Driver/DatabaseQueryParameters call(AbstractQueryInputHandler inputHandler) throws java.sql.SQLException
inputHandler
- Input Handler which would be executed
QueryParameters.getReturn()
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T call(AbstractNamedInputHandler<T> inputHandler) throws java.sql.SQLException
call(org.midao.jdbc.core.handlers.input.query.AbstractQueryInputHandler)
as it is possible to specify Direction in QueryParameters class
T
- The type of object that the handler returnsinputHandler
- Input Handler which would be executed
java.sql.SQLException
- if exception would be thrown by Driver/Database<T> T call(AbstractNamedInputHandler<T> inputHandler, java.lang.String catalog, java.lang.String schema, boolean useCache) throws java.sql.SQLException
call(org.midao.jdbc.core.handlers.input.query.AbstractQueryInputHandler)
as it is possible to specify Direction in QueryParameters class
T
- The type of object that the handler returnsinputHandler
- Input Handler which would be executedcatalog
- Database Catalog. If null would be specified - this value won't be used in searchschema
- Database Schema. If null would be specified - this value won't be used in searchuseCache
- specifies if it should use cache for reading Stored Procedure/Function parameters
java.sql.SQLException
- if exception would be thrown by Driver/Database<T,S> CallResults<T,S> call(InputHandler<T> inputHandler, OutputHandler<S> outputHandler) throws java.sql.SQLException
call(org.midao.jdbc.core.handlers.input.query.AbstractQueryInputHandler)
as it is possible to specify Direction in QueryParameters class
T
- The type of object that the input handler clones, updates and returnsS
- The type of object that the output handler returnsinputHandler
- Input Handler which would be executedoutputHandler
- The handler used to create the result object from Query output
java.sql.SQLException
- if exception would be thrown by Driver/Database<T,S> CallResults<T,S> call(InputHandler<T> inputHandler, OutputHandler<S> outputHandler, java.lang.String catalog, java.lang.String schema, boolean useCache) throws java.sql.SQLException
call(org.midao.jdbc.core.handlers.input.query.AbstractQueryInputHandler)
as it is possible to specify Direction in QueryParameters class
T
- The type of object that the input handler clones, updates and returnsS
- The type of object that the output handler returnsinputHandler
- Input Handler which would be executedoutputHandler
- The handler used to create the result object from Query outputcatalog
- Database Catalog. If null would be specified - this value won't be used in searchschema
- Database Schema. If null would be specified - this value won't be used in searchuseCache
- specifies if it should use cache for reading Stored Procedure/Function parameters
java.sql.SQLException
- if exception would be thrown by Driver/DatabaseQueryRunnerService overrideOnce(java.lang.String operation, java.lang.Object value)
MidaoConstants
OVERRIDE_* Constants
operation
- name of the operationvalue
- override value
QueryRunnerService override(java.lang.String operation, java.lang.Object value)
MidaoConstants
OVERRIDE_* Constants
operation
- name of the operationvalue
- override value
QueryRunnerService removeOverride(java.lang.String operation)
MidaoConstants
OVERRIDE_* Constants
operation
- name of the operation
void setTransactionManualMode(boolean manualMode)
commit()
is required.
manualMode
- manual modeboolean isTransactionManualMode()
void setTransactionIsolationLevel(java.lang.Integer level)
level
- Transaction Isolation leveljava.lang.Integer getTransactionIsolationLevel()
void commit() throws java.sql.SQLException
setTransactionManualMode(boolean)
set as true
java.sql.SQLException
- if exception would be thrown by Driver/Databasevoid rollback() throws java.sql.SQLException
setTransactionManualMode(boolean)
set as true
java.sql.SQLException
- if exception would be thrown by Driver/Databasejava.sql.Savepoint setSavepoint() throws java.sql.SQLException
Connection.setSavepoint()
Usable only when setTransactionManualMode(boolean)
set as true
java.sql.SQLException
- if exception would be thrown by Driver/Databasejava.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
Connection.setSavepoint(String)
Usable only when setTransactionManualMode(boolean)
set as true
java.sql.SQLException
- if exception would be thrown by Driver/Databasevoid rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
Connection.rollback(java.sql.Savepoint)
Usable only when setTransactionManualMode(boolean)
set as true
java.sql.SQLException
- if exception would be thrown by Driver/Databasevoid releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
Connection.releaseSavepoint(java.sql.Savepoint)
Usable only when setTransactionManualMode(boolean)
set as true
java.sql.SQLException
- if exception would be thrown by Driver/Database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |