com.googlecode.jpattern.service.transaction
Class ATransactionManager
java.lang.Object
com.googlecode.jpattern.service.transaction.ATransactionManager
- Direct Known Subclasses:
- NullTransactionManager, SpringTransactionManager
public abstract class ATransactionManager
- extends Object
- Author:
- Francesco Cina'
28 Mar 2011
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATransactionManager
public ATransactionManager()
beginTransaction
public abstract boolean beginTransaction(IProvider provider)
- Begin of a new transaction
- Parameters:
provider - the IProvider to use
- Returns:
closeTransaction
public void closeTransaction(IProvider provider,
IResult result)
- Close the current transaction.
Commits if the result of the transaction is valid, otherwise rollbacks it.
- Parameters:
provider - the IProvider to useresult - the result of the transaction execution
setForceReadOnly
public abstract void setForceReadOnly(boolean forceReadOnly)
commit
protected abstract void commit(IProvider provider)
rollback
protected abstract void rollback(IProvider provider)
setForceNewTransaction
public abstract void setForceNewTransaction(boolean forceNewTransaction)
Copyright © 2011. All Rights Reserved.