Package com.atlassian.sal.crowd.utils
Class TransactionHelper
java.lang.Object
com.atlassian.sal.crowd.utils.TransactionHelper
Utilities for dealing with DB transactions.
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionHelper
(com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate) -
Method Summary
Modifier and TypeMethodDescription<T> T
transactional
(Class<T> serviceClass, T service) Wraps the givenservice
creating a proxy, for which each method will be executed within a DB transaction.
-
Constructor Details
-
TransactionHelper
public TransactionHelper(com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
-
-
Method Details
-
transactional
Wraps the givenservice
creating a proxy, for which each method will be executed within a DB transaction.Needed because we can't use Spring transaction-related annotations and Spring bean wrappers in plugins.
- Parameters:
serviceClass
- interface of the serviceservice
- instance of the service
-