@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 |
static interface |
TransactionWrapper.SneakyHibernateCallable<T> |
static interface |
TransactionWrapper.SneakyHibernateRunnable |
static interface |
TransactionWrapper.SneakySharkCallable<T> |
static interface |
TransactionWrapper.SneakySharkRunnable |
Modifier and Type | Method and Description |
---|---|
<T> T |
doInHibernateJdbcConnection(TransactionWrapper.JdbcCallable<T> callable) |
void |
doInHibernateJdbcConnection(TransactionWrapper.JdbcRunnable runnable) |
<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.
|
<T> T |
doInNewHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable,
boolean readOnly)
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.
|
<T> T |
doInSharkTransaction(TransactionWrapper.SharkCallable<T> callable,
boolean readOnly)
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,
boolean readOnly)
Calls given function inside opened shark transaction.
|
void |
doInSharkTransaction(TransactionWrapper.SharkRunnable runnable,
int propagationBehaviour) |
void |
doInSharkTransaction(TransactionWrapper.SharkRunnable runnable,
int propagationBehaviour,
boolean readOnly) |
<T> T |
doInSneakyHibernateTransaction(TransactionWrapper.SneakyHibernateCallable<T> callable)
Calls given function inside opened hibernate transaction and returns function result.
|
void |
doInSneakyHibernateTransaction(TransactionWrapper.SneakyHibernateRunnable runnable)
Calls given function inside opened hibernate transaction.
|
<T> T |
doInSneakySharkTransaction(TransactionWrapper.SneakySharkCallable<T> callable)
Calls given function inside opened shark transaction and returns function result.
|
void |
doInSneakySharkTransaction(TransactionWrapper.SneakySharkRunnable 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 void doInSneakyHibernateTransaction(TransactionWrapper.SneakyHibernateRunnable runnable)
runnable
- Function to runpublic <T> T doInHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable)
callable
- public <T> T doInSneakyHibernateTransaction(TransactionWrapper.SneakyHibernateCallable<T> callable)
callable
- public void doInNewHibernateTransaction(TransactionWrapper.HibernateRunnable runnable)
public <T> T doInNewHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable)
callable
- public <T> T doInNewHibernateTransaction(TransactionWrapper.HibernateCallable<T> callable, boolean readOnly)
callable
- public void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable)
runnable
- Function to runpublic void doInSneakySharkTransaction(TransactionWrapper.SneakySharkRunnable runnable)
runnable
- Function to runpublic void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable, boolean readOnly)
runnable
- Function to runreadOnly
- Read-only transactionpublic void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable, int propagationBehaviour)
public void doInSharkTransaction(TransactionWrapper.SharkRunnable runnable, int propagationBehaviour, boolean readOnly)
public <T> T doInSharkTransaction(TransactionWrapper.SharkCallable<T> callable)
callable
- public <T> T doInSneakySharkTransaction(TransactionWrapper.SneakySharkCallable<T> callable)
callable
- public <T> T doInSharkTransaction(TransactionWrapper.SharkCallable<T> callable, boolean readOnly)
callable
- readOnly
- public void doInJdbcConnection(TransactionWrapper.JdbcRunnable runnable)
public <T> T doInJdbcConnection(TransactionWrapper.JdbcCallable<T> callable)
public void doInHibernateJdbcConnection(TransactionWrapper.JdbcRunnable runnable)
public <T> T doInHibernateJdbcConnection(TransactionWrapper.JdbcCallable<T> callable)
Copyright © 2025 Suncode. All rights reserved.