|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jdbw.AutoExecutor
public class AutoExecutor
An auto executor will automatically allocate a connection from the pool when its SQL methods are called and return the connection and all resources once done. If a query fails, it will investigate the error and retry if the error is judged to be retryable.
| Constructor Summary | |
|---|---|
AutoExecutor(DataSource dataSource,
DatabaseServerType serverType)
|
|
| Method Summary | |
|---|---|
void |
batchWrite(BatchUpdateHandler handler,
List<String> batchedSQL)
Executes a list of queries as one batch on the remote database server |
void |
batchWrite(BatchUpdateHandler handler,
String SQL,
List<Object[]> parameters)
Executes a batch query where the SQL is structurally the same but parameters are different. |
void |
batchWrite(List<String> batchedSQL)
Shortcut for calling batchWrite(new BatchUpdateHandlerAdapter(), batchedSQL); |
void |
batchWrite(String SQL,
List<Object[]> parameters)
Shortcut for calling batchWrite(new BatchUpdateHandlerAdapter(), batchedSQL, parameters); |
void |
execute(ExecuteResultHandler handler,
String SQL,
Object... parameters)
Sends a query to the database and handles any results through a callback interface |
void |
execute(String SQL,
Object... parameters)
Shortcut for calling execute(new ExecuteResultHandlerAdapter(), SQL, parameters); |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoExecutor(DataSource dataSource,
DatabaseServerType serverType)
| Method Detail |
|---|
public void execute(String SQL,
Object... parameters)
throws SQLException
SQLException
public void execute(ExecuteResultHandler handler,
String SQL,
Object... parameters)
throws SQLException
SQLExecutor
execute in interface SQLExecutorhandler - Callback interface to use for any results of the querySQL - SQL code to send to the database server, use ? for parameter substitutionparameters - List of parameters to insert into the query, must be one for every ? used
SQLException
public void batchWrite(String SQL,
List<Object[]> parameters)
throws SQLException
SQLException
public void batchWrite(BatchUpdateHandler handler,
String SQL,
List<Object[]> parameters)
throws SQLException
SQLExecutor
batchWrite in interface SQLExecutorhandler - Callback interface to use for any results of the querySQL - SQL to use for all queries, use ? for the parameter substitutionparameters - List of object arrays, where one array equals one query sent to the server
SQLException
public void batchWrite(List<String> batchedSQL)
throws SQLException
SQLException
public void batchWrite(BatchUpdateHandler handler,
List<String> batchedSQL)
throws SQLException
SQLExecutor
batchWrite in interface SQLExecutorhandler - Callback interface to use for any results of the querybatchedSQL - List of SQL to send to the remote server
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||