com.framework.jdto.transaction
Interface Transaction

All Known Implementing Classes:
TransactionContext

public interface Transaction

This interface is implemented by the TransactionContext class. it performs the final commit or rollback with the database.

Author:
msatish

Method Summary
 void commit()
          Complete the transaction represented by this Transaction object
 int getStatus()
          Obtain the status of the transaction associated with the current thread.
 void rollback()
          Rollback the transaction represented by this Transaction object.
 void setRollbackOnly()
          Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
 

Method Detail

commit

public void commit()
            throws java.sql.SQLException
Complete the transaction represented by this Transaction object

Throws:
java.sql.SQLException

rollback

public void rollback()
              throws java.sql.SQLException
Rollback the transaction represented by this Transaction object.

Throws:
java.sql.SQLException

getStatus

public int getStatus()
Obtain the status of the transaction associated with the current thread.

Returns:
the current Transaction Status as int.
Throws:
java.lang.Exception

setRollbackOnly

public void setRollbackOnly()
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.