
Package ca.uhn.fhir.jpa.dao.tx
Class HapiTransactionService
java.lang.Object
ca.uhn.fhir.jpa.dao.tx.HapiTransactionService
- All Implemented Interfaces:
IHapiTransactionService
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ca.uhn.fhir.jpa.dao.tx.IHapiTransactionService
IHapiTransactionService.IExecutionBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster
protected IRequestPartitionHelperSvc
protected org.springframework.transaction.PlatformTransactionManager
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> T
doExecute
(HapiTransactionService.ExecutionBuilder theExecutionBuilder, org.springframework.transaction.support.TransactionCallback<T> theCallback) protected <T> T
doExecuteCallback
(HapiTransactionService.ExecutionBuilder theExecutionBuilder, org.springframework.transaction.support.TransactionCallback<T> theCallback) void
execute
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.springframework.transaction.annotation.Propagation thePropagation, org.springframework.transaction.annotation.Isolation theIsolation, Runnable theCallback) Deprecated.<T> T
execute
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.springframework.transaction.support.TransactionCallback<T> theCallback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead<T> T
execute
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.springframework.transaction.support.TransactionCallback<T> theCallback, Runnable theOnRollback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead<T> T
execute
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.springframework.transaction.support.TransactionCallback<T> theCallback, Runnable theOnRollback, org.springframework.transaction.annotation.Propagation thePropagation, org.springframework.transaction.annotation.Isolation theIsolation) Deprecated.<T> T
execute
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.springframework.transaction.support.TransactionCallback<T> theCallback, Runnable theOnRollback, org.springframework.transaction.annotation.Propagation thePropagation, org.springframework.transaction.annotation.Isolation theIsolation, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) Deprecated.UsewithRequest(RequestDetails)
with fluent call insteadstatic <T> T
executeWithDefaultPartitionInContext
(ca.uhn.fhir.util.ICallable<T> theCallback) static ca.uhn.fhir.interceptor.model.RequestPartitionId
org.springframework.transaction.PlatformTransactionManager
static <T> T
invokeCallableAndHandleAnyException
(Callable<T> theTask) InvokesCallable.call()
and rethrows any exceptions thrown by that method.boolean
void
setInterceptorBroadcaster
(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster) void
setRequestPartitionSvcForUnitTest
(IRequestPartitionHelperSvc theRequestPartitionHelperSvc) void
setTransactionManager
(org.springframework.transaction.PlatformTransactionManager theTransactionManager) withRequest
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Fluent builder for creating a transactional callback<T> T
withRequest
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.springframework.transaction.annotation.Propagation thePropagation, org.springframework.transaction.annotation.Isolation theIsolation, ca.uhn.fhir.util.ICallable<T> theCallback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead
-
Field Details
-
XACT_USERDATA_KEY_RESOLVED_TAG_DEFINITIONS
-
XACT_USERDATA_KEY_EXISTING_SEARCH_PARAMS
-
myInterceptorBroadcaster
-
myTransactionManager
@Autowired protected org.springframework.transaction.PlatformTransactionManager myTransactionManager -
myRequestPartitionHelperSvc
-
-
Constructor Details
-
HapiTransactionService
public HapiTransactionService()
-
-
Method Details
-
setInterceptorBroadcaster
public void setInterceptorBroadcaster(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster) -
withRequest
public IHapiTransactionService.IExecutionBuilder withRequest(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Description copied from interface:IHapiTransactionService
Fluent builder for creating a transactional callbackMethod chain must end with a call to
IHapiTransactionService.IExecutionBuilder.execute(Runnable)
or one of the other overloads oftask(...)
- Specified by:
withRequest
in interfaceIHapiTransactionService
-
execute
@Deprecated public <T> T execute(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nullable ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, @Nonnull org.springframework.transaction.support.TransactionCallback<T> theCallback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead -
execute
@Deprecated public void execute(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nullable ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, @Nonnull org.springframework.transaction.annotation.Propagation thePropagation, @Nonnull org.springframework.transaction.annotation.Isolation theIsolation, @Nonnull Runnable theCallback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead -
withRequest
@Deprecated public <T> T withRequest(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nullable ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, @Nonnull org.springframework.transaction.annotation.Propagation thePropagation, @Nonnull org.springframework.transaction.annotation.Isolation theIsolation, @Nonnull ca.uhn.fhir.util.ICallable<T> theCallback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead- Specified by:
withRequest
in interfaceIHapiTransactionService
-
execute
@Deprecated public <T> T execute(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nullable ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, @Nonnull org.springframework.transaction.support.TransactionCallback<T> theCallback, @Nullable Runnable theOnRollback) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead -
execute
@Deprecated public <T> T execute(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nullable ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, @Nonnull org.springframework.transaction.support.TransactionCallback<T> theCallback, @Nullable Runnable theOnRollback, @Nullable org.springframework.transaction.annotation.Propagation thePropagation, @Nullable org.springframework.transaction.annotation.Isolation theIsolation) Deprecated. -
execute
@Deprecated public <T> T execute(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nullable ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, @Nonnull org.springframework.transaction.support.TransactionCallback<T> theCallback, @Nullable Runnable theOnRollback, @Nonnull org.springframework.transaction.annotation.Propagation thePropagation, @Nonnull org.springframework.transaction.annotation.Isolation theIsolation, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) Deprecated.UsewithRequest(RequestDetails)
with fluent call instead -
isCustomIsolationSupported
-
setRequestPartitionSvcForUnitTest
public void setRequestPartitionSvcForUnitTest(IRequestPartitionHelperSvc theRequestPartitionHelperSvc) -
getTransactionManager
-
setTransactionManager
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager theTransactionManager) -
doExecute
@Nullable protected <T> T doExecute(HapiTransactionService.ExecutionBuilder theExecutionBuilder, org.springframework.transaction.support.TransactionCallback<T> theCallback) -
doExecuteCallback
@Nullable protected <T> T doExecuteCallback(HapiTransactionService.ExecutionBuilder theExecutionBuilder, org.springframework.transaction.support.TransactionCallback<T> theCallback) -
invokeCallableAndHandleAnyException
InvokesCallable.call()
and rethrows any exceptions thrown by that method. If the exception extendsBaseServerResponseException
it is rethrown unmodified. Otherwise, it's wrapped in aInternalErrorException
. -
executeWithDefaultPartitionInContext
public static <T> T executeWithDefaultPartitionInContext(@Nonnull ca.uhn.fhir.util.ICallable<T> theCallback) -
getRequestPartitionAssociatedWithThread
public static ca.uhn.fhir.interceptor.model.RequestPartitionId getRequestPartitionAssociatedWithThread()
-
withRequest(RequestDetails)
with fluent call instead