|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jenkov.mrpersister.impl.command.DaoCommandExecutor
public class DaoCommandExecutor
Constructor Summary | |
---|---|
DaoCommandExecutor(PersistenceManager persistenceManager)
|
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. |
protected java.lang.Object |
execute(java.lang.Object configKey,
IDaoCommand command,
java.sql.Connection connection,
IDaosFactoryStrategy daosFactoryStrategy)
|
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. |
protected java.lang.Object |
executeTransaction(java.lang.Object configKey,
IDaoCommand command,
java.sql.Connection connection,
IDaosFactoryStrategy daosFactoryStrategy)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DaoCommandExecutor(PersistenceManager persistenceManager)
Method Detail |
---|
public java.lang.Object execute(IDaoCommand command) throws PersistenceException
IDaoCommandExecutor
execute
in interface IDaoCommandExecutor
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.public java.lang.Object execute(IDaoCommand command, java.sql.Connection connection) throws PersistenceException
IDaoCommandExecutor
execute
in interface IDaoCommandExecutor
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.public java.lang.Object execute(java.lang.Object configKey, IDaoCommand command) throws PersistenceException
IDaoCommandExecutor
execute
in interface IDaoCommandExecutor
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.public java.lang.Object execute(java.lang.Object configKey, IDaoCommand command, java.sql.Connection connection) throws PersistenceException
IDaoCommandExecutor
execute
in interface IDaoCommandExecutor
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.protected java.lang.Object execute(java.lang.Object configKey, IDaoCommand command, java.sql.Connection connection, IDaosFactoryStrategy daosFactoryStrategy) throws PersistenceException
PersistenceException
public java.lang.Object executeTransaction(IDaoCommand command) throws PersistenceException
IDaoCommandExecutor
executeTransaction
in interface IDaoCommandExecutor
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.public java.lang.Object executeTransaction(IDaoCommand command, java.sql.Connection connection) throws PersistenceException
IDaoCommandExecutor
executeTransaction
in interface IDaoCommandExecutor
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.public java.lang.Object executeTransaction(java.lang.Object configKey, IDaoCommand command) throws PersistenceException
IDaoCommandExecutor
executeTransaction
in interface IDaoCommandExecutor
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.public java.lang.Object executeTransaction(java.lang.Object configKey, IDaoCommand command, java.sql.Connection connection) throws PersistenceException
IDaoCommandExecutor
executeTransaction
in interface IDaoCommandExecutor
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.protected java.lang.Object executeTransaction(java.lang.Object configKey, IDaoCommand command, java.sql.Connection connection, IDaosFactoryStrategy daosFactoryStrategy) throws PersistenceException
PersistenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |