org.compass.core.transaction
Class AbstractTransaction

java.lang.Object
  extended by org.compass.core.transaction.AbstractTransaction
All Implemented Interfaces:
CompassTransaction, InternalCompassTransaction
Direct Known Subclasses:
AbstractJTATransaction, HibernateSyncTransaction, LocalTransaction, SpringSyncTransaction

public abstract class AbstractTransaction
extends Object
implements InternalCompassTransaction


Field Summary
protected  TransactionFactory transactionFactory
           
 
Constructor Summary
protected AbstractTransaction(TransactionFactory transactionFactory)
           
 
Method Summary
 void commit()
          Ends the current unit of work.
protected abstract  void doCommit()
           
protected abstract  void doRollback()
           
 SearchEngine getSearchEngine()
           
 boolean isBegun()
           
 void rollback()
          Force the underlying transaction to roll back.
 void setBegun(boolean begun)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.CompassTransaction
getSession, wasCommitted, wasRolledBack
 

Field Detail

transactionFactory

protected final TransactionFactory transactionFactory
Constructor Detail

AbstractTransaction

protected AbstractTransaction(TransactionFactory transactionFactory)
Method Detail

setBegun

public void setBegun(boolean begun)
Specified by:
setBegun in interface InternalCompassTransaction

isBegun

public boolean isBegun()

commit

public void commit()
            throws CompassException
Description copied from interface: CompassTransaction
Ends the current unit of work. The transaction will be commited only if it was initiated by the current transcation.

Specified by:
commit in interface CompassTransaction
Throws:
CompassException

rollback

public void rollback()
              throws CompassException
Description copied from interface: CompassTransaction
Force the underlying transaction to roll back.

Specified by:
rollback in interface CompassTransaction
Throws:
CompassException

getSearchEngine

public SearchEngine getSearchEngine()
Specified by:
getSearchEngine in interface InternalCompassTransaction

doCommit

protected abstract void doCommit()
                          throws CompassException
Throws:
CompassException

doRollback

protected abstract void doRollback()
                            throws CompassException
Throws:
CompassException


Copyright (c) 2004-2009 The Compass Project.