public class TransactionHelper extends Object
Constructor and Description |
---|
TransactionHelper(com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate) |
Modifier and Type | Method and Description |
---|---|
<T> T |
transactional(Class<T> serviceClass,
T service)
Wraps the given
service creating a proxy, for which each method will be executed within a DB transaction. |
public TransactionHelper(com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
public <T> T transactional(Class<T> serviceClass, T service)
service
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.
serviceClass
- interface of the serviceservice
- instance of the serviceCopyright © 2020 Atlassian. All rights reserved.