@Component public class TransactionWrapper extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TransactionWrapper.HibernateCallable<T> |
static interface |
TransactionWrapper.HibernateRunnable |
static interface |
TransactionWrapper.SharkCallable<T> |
static interface |
TransactionWrapper.SharkRunnable |
Modifier and Type | Method and Description |
---|---|
<T> T |
doInHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable)
Calls given function inside opened hibernate transaction and returns function result.
|
void |
doInHibernateTransaction(TransactionWrapper.HibernateRunnable runnable)
Calls given function inside opened hibernate transaction.
|
<T> T |
doInSharkTransaction(TransactionWrapper.SharkCallable<T> callable)
Calls given function inside opened shark transaction and returns function result.
|
void |
doInSharkTransaction(TransactionWrapper.SharkRunnable runnable)
Calls given function inside opened shark transaction.
|
static TransactionWrapper |
get() |
public static TransactionWrapper get()
public void doInHibernateTransaction(TransactionWrapper.HibernateRunnable runnable)
runnable
- Function to runpublic <T> T doInHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable)
callable
- public void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable)
runnable
- Function to runpublic <T> T doInSharkTransaction(TransactionWrapper.SharkCallable<T> callable)
callable
- Copyright © 2019 Suncode. All rights reserved.