Class TransactionUtil

java.lang.Object
org.alfresco.repo.transaction.TransactionUtil

public class TransactionUtil extends Object
Deprecated.
Class containing transactions helper methods and interfaces.
Author:
Derek Hulley
  • Constructor Details

    • TransactionUtil

      public TransactionUtil()
      Deprecated.
  • Method Details

    • flush

      public static void flush()
      Deprecated.
      Flush transaction.
    • executeInUserTransaction

      public static <R> R executeInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork)
      Deprecated.
      Execute the transaction work in a user transaction
      Parameters:
      transactionService - the transaction service
      transactionWork - the transaction work
      Throws:
      RuntimeException - if the transaction was rolled back
    • executeInUserTransaction

      public static <R> R executeInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly)
      Deprecated.
      Execute the transaction work in a user transaction. Any current transaction will be continued.
      Parameters:
      transactionService - the transaction service
      transactionWork - the transaction work
      readOnly - true if the transaction should be read-only
      Throws:
      RuntimeException - if the transaction was rolled back
    • executeInNonPropagatingUserTransaction

      public static <R> R executeInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork)
      Deprecated.
      Execute the transaction work in a writable, non-propagating user transaction. Any current transaction will be suspended a new one started.
      Parameters:
      transactionService - the transaction service
      transactionWork - the transaction work
      Throws:
      RuntimeException - if the transaction was rolled back
    • executeInNonPropagatingUserTransaction

      public static <R> R executeInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly)
      Deprecated.
      Execute the transaction work in a non-propagating user transaction. Any current transaction will be suspended a new one started.
      Parameters:
      transactionService - the transaction service
      transactionWork - the transaction work
      readOnly - true if the transaction should be read-only
      Throws:
      RuntimeException - if the transaction was rolled back