public class TransactionalWrapper
extends java.lang.Object
@Inject
private TransactionalWrapper tx;
public void foo() throws Exception {
tx.execute(()-< {
// do something
});
Something s = tx.execute() -< {
// return something;
});
}
| Modifier and Type | Class and Description |
|---|---|
static interface |
TransactionalWrapper.CheckedProducer<T> |
static interface |
TransactionalWrapper.CheckedRunnable |
| Constructor and Description |
|---|
TransactionalWrapper() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(TransactionalWrapper.CheckedProducer<T> producer) |
void |
execute(TransactionalWrapper.CheckedRunnable runnable) |
public void execute(TransactionalWrapper.CheckedRunnable runnable) throws java.lang.Exception
java.lang.Exceptionpublic <T> T execute(TransactionalWrapper.CheckedProducer<T> producer) throws java.lang.Exception
java.lang.Exception