|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.dao.TransactionCtxImpl
public class TransactionCtxImpl
Default implementation of the TransactionContext interface. Provides implementation for all methods of the interface.
Constructor Summary | |
---|---|
TransactionCtxImpl()
Default constructor |
Method Summary | |
---|---|
void |
commit()
Commits the transaction. |
java.sql.Connection |
getConnection()
Returns the connection used by this context. |
void |
rollback()
Rolls back the transaction. |
void |
setConnection(java.sql.Connection conn)
Set the connection that this context will use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionCtxImpl()
Method Detail |
---|
public void setConnection(java.sql.Connection conn) throws DaoException
setConnection
in interface TransactionContext
conn
- Connection this context will use for Database communication.
DaoException
- if the connection cannot be prepared for transactional
purposes.public java.sql.Connection getConnection()
getConnection
in interface TransactionContext
public void commit() throws DaoException
commit
in interface TransactionContext
DaoException
- if the transaction cannot be committed.public void rollback() throws DaoException
rollback
in interface TransactionContext
DaoException
- if transaction cannot be rolled back.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |