Package org.alfresco.repo.transaction
Class TransactionUtil
- java.lang.Object
-
- org.alfresco.repo.transaction.TransactionUtil
-
public class TransactionUtil extends java.lang.ObjectDeprecated.Use aRetryingTransactionHelperinstanceClass containing transactions helper methods and interfaces.- Author:
- Derek Hulley
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTransactionUtil.TransactionWork<Result>Deprecated.
-
Constructor Summary
Constructors Constructor Description TransactionUtil()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <R> RexecuteInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork)Deprecated.Use aRetryingTransactionHelperinstancestatic <R> RexecuteInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly)Deprecated.Use aRetryingTransactionHelperinstancestatic <R> RexecuteInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork)Deprecated.Use aRetryingTransactionHelperinstancestatic <R> RexecuteInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly)Deprecated.Use aRetryingTransactionHelperinstancestatic voidflush()Deprecated.Flush transaction.
-
-
-
Method Detail
-
flush
public static void flush()
Deprecated.Flush transaction.
-
executeInUserTransaction
public static <R> R executeInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork)
Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a user transaction- Parameters:
transactionService- the transaction servicetransactionWork- the transaction work- Throws:
java.lang.RuntimeException- if the transaction was rolled back
-
executeInUserTransaction
public static <R> R executeInUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly)
Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a user transaction. Any current transaction will be continued.- Parameters:
transactionService- the transaction servicetransactionWork- the transaction workreadOnly- true if the transaction should be read-only- Throws:
java.lang.RuntimeException- if the transaction was rolled back
-
executeInNonPropagatingUserTransaction
public static <R> R executeInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork)
Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a writable, non-propagating user transaction. Any current transaction will be suspended a new one started.- Parameters:
transactionService- the transaction servicetransactionWork- the transaction work- Throws:
java.lang.RuntimeException- if the transaction was rolled back
-
executeInNonPropagatingUserTransaction
public static <R> R executeInNonPropagatingUserTransaction(TransactionService transactionService, TransactionUtil.TransactionWork<R> transactionWork, boolean readOnly)
Deprecated.Use aRetryingTransactionHelperinstanceExecute the transaction work in a non-propagating user transaction. Any current transaction will be suspended a new one started.- Parameters:
transactionService- the transaction servicetransactionWork- the transaction workreadOnly- true if the transaction should be read-only- Throws:
java.lang.RuntimeException- if the transaction was rolled back
-
-