Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.ibatis.dao.engine.transaction.toplink
Class ToplinkDaoTransaction  view ToplinkDaoTransaction download ToplinkDaoTransaction.java

java.lang.Object
  extended bycom.ibatis.dao.engine.transaction.toplink.ToplinkDaoTransaction
All Implemented Interfaces:
com.ibatis.dao.client.DaoTransaction

public class ToplinkDaoTransaction
extends java.lang.Object
implements com.ibatis.dao.client.DaoTransaction

The ToplinkDaoTransaction class represents an abstract DaoTransaction implemented using Toplink. Toplink provides transaction management methods to commit and rollback transactions.

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

Field Summary
private  boolean commmitted
           
private  Server server
           
private  Session session
           
private  UnitOfWork unitOfWork
           
 
Constructor Summary
ToplinkDaoTransaction(UnitOfWork uow, Server server)
          Constructor for the ToplinkDaoTransaction class that accepts a Toplink Server object for creating client sessions.
 
Method Summary
 void commit()
          Commits all pending changes to persistent storage.
protected  void finalize()
          Clean up outstanding units of work and sessions.
 Session getSession()
          Gets the Toplink Session associated with this transaction.
 UnitOfWork getUnitOfWork()
          Gets the active unit of work.
 void rollback()
          Rollback all pending changes to persistent storage and revert changes back to the original state.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

private Server server

session

private Session session

unitOfWork

private UnitOfWork unitOfWork

commmitted

private boolean commmitted
Constructor Detail

ToplinkDaoTransaction

public ToplinkDaoTransaction(UnitOfWork uow,
                             Server server)
                      throws com.ibatis.dao.client.DaoException
Constructor for the ToplinkDaoTransaction class that accepts a Toplink Server object for creating client sessions.

Method Detail

getSession

public Session getSession()
                   throws com.ibatis.dao.client.DaoException
Gets the Toplink Session associated with this transaction.


getUnitOfWork

public UnitOfWork getUnitOfWork()
                         throws com.ibatis.dao.client.DaoException
Gets the active unit of work.


commit

public void commit()
            throws com.ibatis.dao.client.DaoException
Commits all pending changes to persistent storage.


rollback

public void rollback()
              throws com.ibatis.dao.client.DaoException
Rollback all pending changes to persistent storage and revert changes back to the original state.


finalize

protected void finalize()
                 throws java.lang.Throwable
Clean up outstanding units of work and sessions.