com.ibatis.dao.engine.transaction.toplink
Class ToplinkDaoTransactionManager

java.lang.Object
  extended bycom.ibatis.dao.engine.transaction.toplink.ToplinkDaoTransactionManager
All Implemented Interfaces:
DaoTransactionManager

public class ToplinkDaoTransactionManager
extends java.lang.Object
implements DaoTransactionManager

The ToplinkDaoTransactionManager is used by the Dao framework to manage transactions for the Toplink DAO implementation.

Version:
$Revision: 152595 $ $Date: 2004-12-28 09:46:14 -0700 (Tue, 28 Dec 2004) $
Author:
Wayne Gentile

Constructor Summary
ToplinkDaoTransactionManager()
           
 
Method Summary
 void commitTransaction(DaoTransaction transaction)
          Commits pending object changes to permanent storage.
 void configure(java.util.Properties properties)
          Called by the DAO framework upon instantiation to set configuration properties for the manager.
 void rollbackTransaction(DaoTransaction transaction)
          Reverts pending object changes and returns objects to their original state.
 DaoTransaction startTransaction()
          Starts a new transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToplinkDaoTransactionManager

public ToplinkDaoTransactionManager()
Method Detail

commitTransaction

public void commitTransaction(DaoTransaction transaction)
                       throws DaoException
Commits pending object changes to permanent storage.

Specified by:
commitTransaction in interface DaoTransactionManager
Parameters:
transaction - A previously started transaction.
Throws:
DaoException - If a data access exception is thrown

configure

public void configure(java.util.Properties properties)
               throws DaoException
Called by the DAO framework upon instantiation to set configuration properties for the manager.

Properties are specified in the iBATIS dao.xml file.

Specified by:
configure in interface DaoTransactionManager
Parameters:
properties - The properties associated with the transaction manager
Throws:
DaoException - If a DaoException occurs

rollbackTransaction

public void rollbackTransaction(DaoTransaction transaction)
                         throws DaoException
Reverts pending object changes and returns objects to their original state.

Specified by:
rollbackTransaction in interface DaoTransactionManager
Parameters:
transaction - A previously started transaction.
Throws:
DaoException - If a data access exception is thrown

startTransaction

public DaoTransaction startTransaction()
                                throws DaoException
Starts a new transaction. Changes to objects will not be committed until further instructions are executed.

Specified by:
startTransaction in interface DaoTransactionManager
Returns:
The DaoTransaction that has been started
Throws:
DaoException - If a data access exception is thrown