org.compass.gps.device.hibernate
Class HibernateSyncTransaction

java.lang.Object
  extended by org.compass.core.transaction.AbstractTransaction
      extended by org.compass.gps.device.hibernate.HibernateSyncTransaction
All Implemented Interfaces:
CompassTransaction, InternalCompassTransaction

public class HibernateSyncTransaction
extends AbstractTransaction

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.compass.core.CompassTransaction
CompassTransaction.TransactionIsolation
 
Field Summary
 
Fields inherited from class org.compass.core.transaction.AbstractTransaction
transactionFactory
 
Constructor Summary
HibernateSyncTransaction(SessionFactory sessionFactory, boolean commitBeforeCompletion, TransactionFactory transactionFactory)
           
 
Method Summary
 void begin(InternalCompassSession session, CompassTransaction.TransactionIsolation transactionIsolation)
           
protected  void doCommit()
           
protected  void doRollback()
           
 CompassSession getSession()
          Returns the current Compass transaction associated with this transaction.
 void join(InternalCompassSession session)
          Called by the factory when joining an already running compass transaction
 boolean wasCommitted()
          Check if this transaction was successfully committed.
 boolean wasRolledBack()
          Was this transaction rolled back or set to rollback only?
 
Methods inherited from class org.compass.core.transaction.AbstractTransaction
commit, getSearchEngine, isBegun, rollback, setBegun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateSyncTransaction

public HibernateSyncTransaction(SessionFactory sessionFactory,
                                boolean commitBeforeCompletion,
                                TransactionFactory transactionFactory)
Method Detail

begin

public void begin(InternalCompassSession session,
                  CompassTransaction.TransactionIsolation transactionIsolation)
           throws CompassException
Throws:
CompassException

join

public void join(InternalCompassSession session)
          throws CompassException
Called by the factory when joining an already running compass transaction

Throws:
CompassException

doCommit

protected void doCommit()
                 throws CompassException
Specified by:
doCommit in class AbstractTransaction
Throws:
CompassException

doRollback

protected void doRollback()
                   throws CompassException
Specified by:
doRollback in class AbstractTransaction
Throws:
CompassException

wasRolledBack

public boolean wasRolledBack()
                      throws TransactionException
Description copied from interface: CompassTransaction
Was this transaction rolled back or set to rollback only?

Returns:
If the transaction was rolled backed
Throws:
TransactionException

wasCommitted

public boolean wasCommitted()
                     throws TransactionException
Description copied from interface: CompassTransaction
Check if this transaction was successfully committed. This method could return false even after successful invocation of commit().

Returns:
If the transaction was committed
Throws:
TransactionException

getSession

public CompassSession getSession()
Description copied from interface: CompassTransaction
Returns the current Compass transaction associated with this transaction.



Copyright (c) 2004-2008 The Compass Project.