org.mentawai.transaction
Interface Transaction

All Known Implementing Classes:
HibernateTransaction, JdbcTransaction, JpaTransaction

public interface Transaction

Defines the behaviour of a transaction.

Author:
Sergio Oliveira

Method Summary
 void begin()
          Begins the transaction.
 void commit()
          Commits the transaction.
 boolean isActive()
          Is the transaction still active, in other words, is it still not commited and not rolledback ?
 void rollback()
          Rollbacks the transaction.
 boolean wasCommited()
          Was the transaction successfuly commited?
 boolean wasRolledBack()
          Was the transaction successfuly rolledback?
 

Method Detail

begin

void begin()
           throws java.lang.Exception
Begins the transaction.

Throws:
java.lang.Exception

commit

void commit()
            throws java.lang.Exception
Commits the transaction.

Throws:
java.lang.Exception

rollback

void rollback()
              throws java.lang.Exception
Rollbacks the transaction.

Throws:
java.lang.Exception

isActive

boolean isActive()
Is the transaction still active, in other words, is it still not commited and not rolledback ?

Returns:
true if the transaction was not commited and was not rolledback

wasCommited

boolean wasCommited()
Was the transaction successfuly commited?

Returns:
true if the transaction was successfuly commited

wasRolledBack

boolean wasRolledBack()
Was the transaction successfuly rolledback?

Returns:
true if the transaction was successfuly rolledback


Copyright © 2005 Mentawai Team. All Rights Reserved.