
Class TransactionDetails
- java.lang.Object
-
- ca.uhn.fhir.rest.api.server.storage.TransactionDetails
-
public class TransactionDetails extends Object
This object contains runtime information that is gathered and relevant to a single database transaction. This doesn't mean a FHIR transaction necessarily, but rather any operation that happens within a single DB transaction (i.e. a FHIR create, read, transaction, etc.).The intent with this class is to hold things we want to pass from operation to operation within a transaction in order to avoid looking things up multiple times, etc.
- Since:
- 5.0.0
-
-
Constructor Summary
Constructors Constructor Description TransactionDetails()
ConstructorTransactionDetails(Date theTransactionDate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDeferredInterceptorBroadcast(ca.uhn.fhir.interceptor.api.Pointcut thePointcut, ca.uhn.fhir.interceptor.api.HookParams theHookParams)
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if neededvoid
addResolvedResourceId(org.hl7.fhir.instance.model.api.IIdType theResourceId, ResourcePersistentId thePersistentId)
A Resolved Resource ID is a mapping between a resource ID (e.g.void
beginAcceptingDeferredInterceptorBroadcasts(ca.uhn.fhir.interceptor.api.Pointcut... thePointcuts)
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if neededcom.google.common.collect.ListMultimap<ca.uhn.fhir.interceptor.api.Pointcut,ca.uhn.fhir.interceptor.api.HookParams>
endAcceptingDeferredInterceptorBroadcasts()
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if needed<T> T
getOrCreateUserData(String theKey, Supplier<T> theSupplier)
Fetches the existing value in the user data map, or uses theSupplier to create a new object and puts that in the map, and returns itMap<org.hl7.fhir.instance.model.api.IIdType,ResourcePersistentId>
getResolvedResourceIds()
A Resolved Resource ID is a mapping between a resource ID (e.g.Date
getTransactionDate()
This is the wall-clock time that a given transaction started.<T> T
getUserData(String theKey)
Gets an arbitraty object that will last the lifetime of the current transactionboolean
isAcceptingDeferredInterceptorBroadcasts()
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if neededboolean
isAcceptingDeferredInterceptorBroadcasts(ca.uhn.fhir.interceptor.api.Pointcut thePointcut)
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if neededvoid
putUserData(String theKey, Object theValue)
Sets an arbitraty object that will last the lifetime of the current transaction
-
-
-
Constructor Detail
-
TransactionDetails
public TransactionDetails()
Constructor
-
TransactionDetails
public TransactionDetails(Date theTransactionDate)
Constructor
-
-
Method Detail
-
getResolvedResourceIds
public Map<org.hl7.fhir.instance.model.api.IIdType,ResourcePersistentId> getResolvedResourceIds()
A Resolved Resource ID is a mapping between a resource ID (e.g. "Patient/ABC
" or "Observation/123
") and a storage ID for that resource. Resources should only be placed within the TransactionDetails if they are known to exist and be valid targets for other resources to link to.
-
addResolvedResourceId
public void addResolvedResourceId(org.hl7.fhir.instance.model.api.IIdType theResourceId, ResourcePersistentId thePersistentId)
A Resolved Resource ID is a mapping between a resource ID (e.g. "Patient/ABC
" or "Observation/123
") and a storage ID for that resource. Resources should only be placed within the TransactionDetails if they are known to exist and be valid targets for other resources to link to.
-
getTransactionDate
public Date getTransactionDate()
This is the wall-clock time that a given transaction started.
-
putUserData
public void putUserData(String theKey, Object theValue)
Sets an arbitraty object that will last the lifetime of the current transaction- See Also:
getUserData(String)
-
getUserData
public <T> T getUserData(String theKey)
Gets an arbitraty object that will last the lifetime of the current transaction- See Also:
putUserData(String, Object)
-
getOrCreateUserData
public <T> T getOrCreateUserData(String theKey, Supplier<T> theSupplier)
Fetches the existing value in the user data map, or uses theSupplier to create a new object and puts that in the map, and returns it
-
beginAcceptingDeferredInterceptorBroadcasts
public void beginAcceptingDeferredInterceptorBroadcasts(ca.uhn.fhir.interceptor.api.Pointcut... thePointcuts)
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if needed- Since:
- 5.2.0
-
isAcceptingDeferredInterceptorBroadcasts
public boolean isAcceptingDeferredInterceptorBroadcasts()
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if needed- Since:
- 5.2.0
-
isAcceptingDeferredInterceptorBroadcasts
public boolean isAcceptingDeferredInterceptorBroadcasts(ca.uhn.fhir.interceptor.api.Pointcut thePointcut)
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if needed- Since:
- 5.2.0
-
endAcceptingDeferredInterceptorBroadcasts
public com.google.common.collect.ListMultimap<ca.uhn.fhir.interceptor.api.Pointcut,ca.uhn.fhir.interceptor.api.HookParams> endAcceptingDeferredInterceptorBroadcasts()
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if needed- Since:
- 5.2.0
-
addDeferredInterceptorBroadcast
public void addDeferredInterceptorBroadcast(ca.uhn.fhir.interceptor.api.Pointcut thePointcut, ca.uhn.fhir.interceptor.api.HookParams theHookParams)
This can be used by processors for FHIR transactions to defer interceptor broadcasts on sub-requests if needed- Since:
- 5.2.0
-
-