
Package ca.uhn.fhir.jpa.dao
Class BaseTransactionProcessor
java.lang.Object
ca.uhn.fhir.jpa.dao.BaseTransactionProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassTransaction Order, per the spec: -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternprotected IHapiTransactionServicestatic final Patternstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.instance.model.api.IBaseBundlecollection(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseBundle theRequest) protected RequestPartitionIddetermineRequestPartitionIdForWriteEntries(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, List<org.hl7.fhir.instance.model.api.IBase> theEntries) This method looks at the FHIR actions being performed in a List of bundle entries, and determines the associated request partitions.protected EntriesToProcessMapdoTransactionWriteOperations(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId, String theActionName, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, Set<org.hl7.fhir.instance.model.api.IIdType> theAllIds, IdSubstitutionMap theIdSubstitutions, Map<org.hl7.fhir.instance.model.api.IIdType, DaoMethodOutcome> theIdToPersistedOutcome, org.hl7.fhir.instance.model.api.IBaseBundle theResponse, IdentityHashMap<org.hl7.fhir.instance.model.api.IBase, Integer> theOriginalRequestOrder, List<org.hl7.fhir.instance.model.api.IBase> theEntries, ca.uhn.fhir.util.StopWatch theTransactionStopWatch) After pre-hooks have been calledprotected abstract voidflushSession(Map<org.hl7.fhir.instance.model.api.IIdType, DaoMethodOutcome> theIdToPersistedOutcome) protected voidSubclasses may override this in order to invoke specific operations when we're finished handling all the write entries in the transaction bundle with a given verb.static booleanisPlaceholder(org.hl7.fhir.instance.model.api.IIdType theId) static StringperformIdSubstitutionsInMatchUrl(IdSubstitutionMap theIdSubstitutions, String theMatchUrl) Given a match URL containingprotected voidpostTransactionProcess(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Implement to handle post transaction processingvoidsetContext(ca.uhn.fhir.context.FhirContext theContext) voidsetDaoRegistry(DaoRegistry theDaoRegistry) voidsetHapiTransactionService(HapiTransactionService theHapiTransactionService) voidsetInterceptorBroadcasterForUnitTest(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster) voidsetPartitionSettingsForUnitTest(PartitionSettings thePartitionSettings) voidsetStorageSettings(StorageSettings theStorageSettings) voidsetTxManager(org.springframework.transaction.PlatformTransactionManager theTxManager) voidsetVersionAdapter(ITransactionProcessorVersionAdapter theVersionAdapter) static StringtoStatusString(int theStatusCode) <BUNDLE extends org.hl7.fhir.instance.model.api.IBaseBundle>
BUNDLEtransaction(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, BUNDLE theRequest, boolean theNestedMode) protected void
-
Field Details
-
URN_PREFIX
- See Also:
-
URN_PREFIX_ESCAPED
-
UNQUALIFIED_MATCH_URL_START
-
INVALID_PLACEHOLDER_PATTERN
-
myHapiTransactionService
-
-
Constructor Details
-
BaseTransactionProcessor
public BaseTransactionProcessor()
-
-
Method Details
-
setStorageSettings
-
getVersionAdapter
-
setVersionAdapter
-
transaction
public <BUNDLE extends org.hl7.fhir.instance.model.api.IBaseBundle> BUNDLE transaction(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, BUNDLE theRequest, boolean theNestedMode) -
collection
public org.hl7.fhir.instance.model.api.IBaseBundle collection(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseBundle theRequest) -
setTxManager
-
setHapiTransactionService
-
determineRequestPartitionIdForWriteEntries
@Nullable protected RequestPartitionId determineRequestPartitionIdForWriteEntries(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, List<org.hl7.fhir.instance.model.api.IBase> theEntries) This method looks at the FHIR actions being performed in a List of bundle entries, and determines the associated request partitions. -
validateDependencies
-
doTransactionWriteOperations
protected EntriesToProcessMap doTransactionWriteOperations(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId, String theActionName, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, Set<org.hl7.fhir.instance.model.api.IIdType> theAllIds, IdSubstitutionMap theIdSubstitutions, Map<org.hl7.fhir.instance.model.api.IIdType, DaoMethodOutcome> theIdToPersistedOutcome, org.hl7.fhir.instance.model.api.IBaseBundle theResponse, IdentityHashMap<org.hl7.fhir.instance.model.api.IBase, Integer> theOriginalRequestOrder, List<org.hl7.fhir.instance.model.api.IBase> theEntries, ca.uhn.fhir.util.StopWatch theTransactionStopWatch) After pre-hooks have been called -
handleVerbChangeInTransactionWriteOperations
Subclasses may override this in order to invoke specific operations when we're finished handling all the write entries in the transaction bundle with a given verb. -
postTransactionProcess
protected void postTransactionProcess(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Implement to handle post transaction processing -
flushSession
protected abstract void flushSession(Map<org.hl7.fhir.instance.model.api.IIdType, DaoMethodOutcome> theIdToPersistedOutcome) -
setDaoRegistry
-
setContext
-
setInterceptorBroadcasterForUnitTest
public void setInterceptorBroadcasterForUnitTest(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster) -
setPartitionSettingsForUnitTest
-
isPlaceholder
-
toStatusString
-
performIdSubstitutionsInMatchUrl
public static String performIdSubstitutionsInMatchUrl(IdSubstitutionMap theIdSubstitutions, String theMatchUrl) Given a match URL containing- Parameters:
theIdSubstitutions-theMatchUrl-- Returns:
-