Package ca.uhn.fhir.jpa.dao
Class BaseTransactionProcessor
java.lang.Object
ca.uhn.fhir.jpa.dao.BaseTransactionProcessor
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
Transaction Order, per the spec: -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.instance.model.api.IBaseBundle
collection
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseBundle theRequest) protected RequestPartitionId
determineRequestPartitionIdForWriteEntries
(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, 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 EntriesToProcessMap
doTransactionWriteOperations
(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, 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 void
flushSession
(Map<org.hl7.fhir.instance.model.api.IIdType, DaoMethodOutcome> theIdToPersistedOutcome) protected void
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.static boolean
isPlaceholder
(org.hl7.fhir.instance.model.api.IIdType theId) static String
performIdSubstitutionsInMatchUrl
(IdSubstitutionMap theIdSubstitutions, String theMatchUrl) Given a match URL containingprotected void
postTransactionProcess
(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Implement to handle post transaction processingvoid
setContext
(ca.uhn.fhir.context.FhirContext theContext) void
setDaoRegistry
(DaoRegistry theDaoRegistry) void
setHapiTransactionService
(HapiTransactionService theHapiTransactionService) void
setPartitionSettingsForUnitTest
(PartitionSettings thePartitionSettings) void
setStorageSettings
(StorageSettings theStorageSettings) void
setTxManager
(org.springframework.transaction.PlatformTransactionManager theTxManager) void
setVersionAdapter
(ITransactionProcessorVersionAdapter theVersionAdapter) <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
-
-
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, 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, 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
-
setPartitionSettingsForUnitTest
-
isPlaceholder
-
performIdSubstitutionsInMatchUrl
public static String performIdSubstitutionsInMatchUrl(IdSubstitutionMap theIdSubstitutions, String theMatchUrl) Given a match URL containing- Parameters:
theIdSubstitutions
-theMatchUrl
-- Returns:
-