Class EntityTransactionHelper
java.lang.Object
de.xima.fc.dao.EntityTransactionHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwithTransaction(IEntityContext ec, IThrowingRunnable runnable) Starts a new transaction, runs the given runnable, and commits the transaction if it completes successfully.
-
Method Details
-
withTransaction
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
-