org.nakedobjects.runtime.transaction
Interface NakedObjectTransactionManager

All Superinterfaces:
Component, Injectable, SessionScopedComponent
All Known Implementing Classes:
NakedObjectTransactionManagerAbstract, ObjectStoreTransactionManager

public interface NakedObjectTransactionManager
extends SessionScopedComponent, Injectable


Method Summary
 void abortTransaction()
           
 void debugData(DebugString debug)
           
 void endTransaction()
          Ends the transaction if nesting level is 0.
 void executeWithinTransaction(TransactionalClosure closure)
          Run the supplied block of code (closure) in a transaction.
<T> T
executeWithinTransaction(TransactionalClosureWithReturn<T> closure)
          Run the supplied block of code (closure) in a transaction.
 boolean flushTransaction()
           
 NakedObjectSession getSession()
          The owning NakedObjectSession.
 NakedObjectTransaction getTransaction()
          The current transaction, if any.
 void startTransaction()
           
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.SessionScopedComponent
close, open
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.Injectable
injectInto
 

Method Detail

getSession

NakedObjectSession getSession()
The owning NakedObjectSession.

Will be non-null when opened, but null if closed .


startTransaction

void startTransaction()

flushTransaction

boolean flushTransaction()

abortTransaction

void abortTransaction()

endTransaction

void endTransaction()
Ends the transaction if nesting level is 0.


getTransaction

NakedObjectTransaction getTransaction()
The current transaction, if any.


executeWithinTransaction

void executeWithinTransaction(TransactionalClosure closure)
Run the supplied block of code (closure) in a transaction.

If a transaction is in progress, then uses that. Otherwise will start a transaction before running the block and commit it at the end. If the closure throws an exception, then will abort the transaction.


executeWithinTransaction

<T> T executeWithinTransaction(TransactionalClosureWithReturn<T> closure)
Run the supplied block of code (closure) in a transaction.

If a transaction is in progress, then uses that. Otherwise will start a transaction before running the block and commit it at the end. If the closure throws an exception, then will abort the transaction.


debugData

void debugData(DebugString debug)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.