Class EntityTransactionHelper

java.lang.Object
de.xima.fc.dao.EntityTransactionHelper

public final class EntityTransactionHelper extends Object
  • Method Details

    • 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 transaction
      runnable - The runnable to execute within the transaction