|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDaoCommandExecutor
The dao command executor supplies full connection and transaction management during execution of dao commands against the database. A connection will be obtained and closed automaically in the background. For the transaction methods
Method Summary | |
---|---|
java.lang.Object |
execute(IDaoCommand command)
Obtains a connection from the default data source, executes this dao command and closes the connection afterwards. |
java.lang.Object |
execute(IDaoCommand command,
java.sql.Connection connection)
Executes this dao command using the given connection, and closes the connection afterwards. |
java.lang.Object |
execute(java.lang.Object configKey,
IDaoCommand command)
Obtains a connection from the data source set on the IPersistenceConfiguration stored by the given configKey (in the persistence managers config factory), executes this dao command and closes the connection afterwards. |
java.lang.Object |
execute(java.lang.Object configKey,
IDaoCommand command,
java.sql.Connection connection)
Executes the dao command using the given connection and the IPersistenceConfiguration stored by the given configKey in the persistence managers config factory), and closes the connection afterwards. |
java.lang.Object |
executeTransaction(IDaoCommand command)
Obtains a connection from the default data source, sets auto commit to false, executes the dao command and tries to commit the transaction. |
java.lang.Object |
executeTransaction(IDaoCommand command,
java.sql.Connection connection)
Sets auto commit to false on the given connection, executes the dao command and tries to commit the transaction. |
java.lang.Object |
executeTransaction(java.lang.Object configKey,
IDaoCommand command)
Obtains a connection from the data source set on the IPersistenceConfiguration stored by the given configKey (in the persistence managers config factory), sets auto commit to false, executes the dao command and tries to commit the transaction. |
java.lang.Object |
executeTransaction(java.lang.Object configKey,
IDaoCommand command,
java.sql.Connection connection)
Obtains the persistence configuration stored by the given config key, (in the persistence managers config factory), sets auto commit to false on the given connection, executes the dao command, and tries to commit the transaction. |
Method Detail |
---|
java.lang.Object execute(IDaoCommand command) throws PersistenceException
command
- The dao command to execute.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object execute(IDaoCommand command, java.sql.Connection connection) throws PersistenceException
command
- The dao command to executeconnection
- The connection used by the dao command during execution.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object execute(java.lang.Object configKey, IDaoCommand command) throws PersistenceException
configKey
- The key of the IPersistenceConfiguration to get the data source from.command
- The dao command to execute.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object execute(java.lang.Object configKey, IDaoCommand command, java.sql.Connection connection) throws PersistenceException
configKey
- The IPersistenceConfiguration used by the dao command during execution.command
- The dao command to executeconnection
- The connection used by the dao command during execution.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object executeTransaction(IDaoCommand command) throws PersistenceException
command
- The dao command to execute.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object executeTransaction(IDaoCommand command, java.sql.Connection connection) throws PersistenceException
command
- The dao command to execute.connection
- The connection the dao command will use during execution.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object executeTransaction(java.lang.Object configKey, IDaoCommand command) throws PersistenceException
configKey
- The key of the persistence configuration the dao command is to use during execution.command
- The dao command to execute.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.java.lang.Object executeTransaction(java.lang.Object configKey, IDaoCommand command, java.sql.Connection connection) throws PersistenceException
configKey
- The key of the persistence configuration the dao command is to use during execution.command
- The dao command to execute.connection
- The connection the dao command will use during execution.
PersistenceException
- If something goes wrong during execution of the dao command. Fx.
if an exception is thrown by the dao command.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |