|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.subshell.persistence.transaction.TransactionContext
public class TransactionContext
Provides a thread-local transaction context.
| Constructor Summary | |
|---|---|
TransactionContext(Transaction transaction)
Creates a new transaction context. |
|
| Method Summary | ||
|---|---|---|
|
addPersistenceMapper(Class<T> clazz,
PersistenceMapper<T> mapper)
|
|
static void |
clearCurrentContext()
Clears the transaction context to be associated with the current thread. |
|
static TransactionContext |
getCurrentContext()
Returns the transaction context associated with the current thread. |
|
|
getPersistenceMapper(Class<T> clazz)
|
|
Transaction |
getTransaction()
Returns this transaction context's transaction. |
|
static void |
setCurrentContext(TransactionContext context)
Sets the transaction context to be associated with the current thread. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionContext(Transaction transaction)
transaction - transaction this transaction context is storing| Method Detail |
|---|
public static TransactionContext getCurrentContext()
TransactionContextNotSetException - when there is no transaction context
associated with the current threadpublic static void setCurrentContext(TransactionContext context)
public static void clearCurrentContext()
public Transaction getTransaction()
public <T> PersistenceMapper<T> getPersistenceMapper(Class<T> clazz)
public <T> void addPersistenceMapper(Class<T> clazz,
PersistenceMapper<T> mapper)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||