org.mentawai.transaction
Class JdbcTransaction

java.lang.Object
  extended by org.mentawai.transaction.JdbcTransaction
All Implemented Interfaces:
Transaction

public class JdbcTransaction
extends java.lang.Object
implements Transaction


Constructor Summary
JdbcTransaction()
           
JdbcTransaction(java.sql.Connection conn)
           
 
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.
 void setConnection(java.sql.Connection conn)
           
 boolean wasCommited()
          Was the transaction successfuly commited?
 boolean wasRolledBack()
          Was the transaction successfuly rolledback?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcTransaction

public JdbcTransaction()

JdbcTransaction

public JdbcTransaction(java.sql.Connection conn)
Method Detail

setConnection

public void setConnection(java.sql.Connection conn)

begin

public void begin()
           throws java.lang.Exception
Description copied from interface: Transaction
Begins the transaction.

Specified by:
begin in interface Transaction
Throws:
java.lang.Exception

commit

public void commit()
            throws java.lang.Exception
Description copied from interface: Transaction
Commits the transaction.

Specified by:
commit in interface Transaction
Throws:
java.lang.Exception

rollback

public void rollback()
              throws java.lang.Exception
Description copied from interface: Transaction
Rollbacks the transaction.

Specified by:
rollback in interface Transaction
Throws:
java.lang.Exception

isActive

public boolean isActive()
Description copied from interface: Transaction
Is the transaction still active, in other words, is it still not commited and not rolledback ?

Specified by:
isActive in interface Transaction
Returns:
true if the transaction was not commited and was not rolledback

wasCommited

public boolean wasCommited()
Description copied from interface: Transaction
Was the transaction successfuly commited?

Specified by:
wasCommited in interface Transaction
Returns:
true if the transaction was successfuly commited

wasRolledBack

public boolean wasRolledBack()
Description copied from interface: Transaction
Was the transaction successfuly rolledback?

Specified by:
wasRolledBack in interface Transaction
Returns:
true if the transaction was successfuly rolledback


Copyright © 2005 Mentawai Team. All Rights Reserved.