@Component public class TransactionWrapper extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TransactionWrapper.HibernateCallable<T> |
static interface |
TransactionWrapper.HibernateRunnable |
static interface |
TransactionWrapper.JdbcCallable<T> |
static interface |
TransactionWrapper.JdbcRunnable |
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 |
doInJdbcConnection(TransactionWrapper.JdbcCallable<T> callable) |
void |
doInJdbcConnection(TransactionWrapper.JdbcRunnable runnable) |
<T> T |
doInNewHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable)
Calls given function inside new hibernate transaction and returns function result.runnable.
|
void |
doInNewHibernateTransaction(TransactionWrapper.HibernateRunnable runnable) |
<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.
|
void |
doInSharkTransaction(TransactionWrapper.SharkRunnable runnable,
int propagationBehaviour) |
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 doInNewHibernateTransaction(TransactionWrapper.HibernateRunnable runnable)
public <T> T doInNewHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable)
callable
- public void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable)
runnable
- Function to runpublic void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable, int propagationBehaviour)
public <T> T doInSharkTransaction(TransactionWrapper.SharkCallable<T> callable)
callable
- public void doInJdbcConnection(TransactionWrapper.JdbcRunnable runnable)
public <T> T doInJdbcConnection(TransactionWrapper.JdbcCallable<T> callable)
Copyright © 2023 Suncode. All rights reserved.