Package de.xima.fc.dao
Class EntityTransactionHelper
- java.lang.Object
-
- de.xima.fc.dao.EntityTransactionHelper
-
public final class EntityTransactionHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidwithTransaction(IEntityContext ec, IThrowingRunnable runnable)Starts a new transaction, runs the given runnable, and commits the transaction if it completes successfully.
-
-
-
Method Detail
-
withTransaction
public static void withTransaction(IEntityContext ec, IThrowingRunnable runnable)
Starts a new transaction, runs the given runnable, and commits the transaction if it completes successfully. If the runnable throws an exception, the transaction is rolled back.- Parameters:
ec- The entity context to use for the transactionrunnable- The runnable to execute within the transaction
-
-