
Package ca.uhn.fhir.jpa.dao
Class BaseHapiFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
java.lang.Object
ca.uhn.fhir.jpa.dao.BaseStorageDao
ca.uhn.fhir.jpa.dao.BaseStorageResourceDao<T>
ca.uhn.fhir.jpa.dao.BaseHapiFhirDao<T>
ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao<T>
- All Implemented Interfaces:
IDao,IFhirResourceDao<T>,IJpaDao<T>,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
FhirResourceDaoSubscriptionDstu2,FhirResourceDaoSubscriptionDstu3,FhirResourceDaoSubscriptionR4,FhirResourceDaoSubscriptionR4B,FhirResourceDaoSubscriptionR5,JpaResourceDao,JpaResourceDaoBundle,JpaResourceDaoCodeSystem,JpaResourceDaoComposition,JpaResourceDaoEncounter,JpaResourceDaoObservation,JpaResourceDaoPatient,JpaResourceDaoSearchParameter,JpaResourceDaoStructureDefinition,JpaResourceDaoValueSet
public abstract class BaseHapiFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
extends BaseHapiFhirDao<T>
implements IFhirResourceDao<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected ca.uhn.fhir.interceptor.api.IInterceptorBroadcasterprotected org.springframework.transaction.PlatformTransactionManagerprotected IFulltextSearchSvcprotected HapiTransactionServiceFields inherited from class ca.uhn.fhir.jpa.dao.BaseHapiFhirDao
cacheTagDefinitionDao, myCodingSpy, myDeleteConflictService, myEntityManager, myIdHelperService, myInMemoryResourceMatcher, myJpaStorageResourceParser, myPartitionSettings, myResourceHistoryCalculator, myResourceHistoryTableDao, myResourceLinkDao, myResourceTableDao, myResourceTagDao, myResourceTypeCacheSvc, mySearchCoordinatorSvc, myTerminologySvc, NS_JPA_PROFILEFields inherited from class ca.uhn.fhir.jpa.dao.BaseStorageResourceDao
STRICT_ERROR_HANDLERFields inherited from class ca.uhn.fhir.jpa.dao.BaseStorageDao
MESSAGE_KEY_DELETE_RESOURCE_ALREADY_DELETED, MESSAGE_KEY_DELETE_RESOURCE_NOT_EXISTING, myFhirContext, myMetaTagSorter, myResourceVersionSvc, mySearchParamRegistry, myStorageSettings, OO_ISSUE_CODE_INFORMATIONAL, OO_SEVERITY_ERROR, OO_SEVERITY_INFO, OO_SEVERITY_WARNFields inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
CURRENTLY_REINDEXING, RESOURCE_PID, RESOURCE_PID_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.Usecreate(T, String, RequestDetails)insteadcreate(T theResource, String theIfNoneExist, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) create(T theResource, String theIfNoneExist, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) delete(org.hl7.fhir.instance.model.api.IIdType theId) Deprecated.Usedelete(IIdType, RequestDetails)insteaddelete(org.hl7.fhir.instance.model.api.IIdType theId, DeleteConflictList theDeleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) delete(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) deleteByUrl(String theUrl, DeleteConflictList deleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) This method gets called bydeleteByUrl(String, RequestDetails)as well as by transaction processorsdeleteByUrl(String theUrl, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) <P extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
DeleteMethodOutcomedeletePidList(String theUrl, Collection<P> theResourceIds, DeleteConflictList theDeleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) protected DaoMethodOutcomedoCreateForPost(T theResource, String theIfNoneExist, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) Called for FHIR create (POST) operationsprotected <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
voiddoMetaAddOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaAdd, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId) <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
voiddoMetaDeleteOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaDel, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId) protected DaoMethodOutcomedoUpdateForUpdateOrPatch(UpdateParameters<T> theUpdateParameters) expunge(ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) <P extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
voidexpunge(Collection<P> theResourceIds, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) expunge(org.hl7.fhir.instance.model.api.IIdType theId, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Stream<ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> fetchAllVersionsOfResources(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, Collection<ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> theIds) forceExpungeInExistingTransaction(org.hl7.fhir.instance.model.api.IIdType theId, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) protected ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitterprotected MatchResourceUrlServiceprotected MatchUrlServiceprotected StringgetMessageSanitized(String theKey, String theIdPart) protected IRequestPartitionHelperSvcprotected IStorageResourceParserprotected HapiTransactionServiceca.uhn.fhir.rest.api.server.IBundleProviderhistory(Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) ca.uhn.fhir.rest.api.server.IBundleProviderhistory(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.param.HistorySearchDateRangeParam theHistorySearchDateRangeParam, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) ca.uhn.fhir.rest.api.server.IBundleProviderhistory(org.hl7.fhir.instance.model.api.IIdType theId, Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Deprecated.static voidinvokeStoragePreAccessResources(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, org.hl7.fhir.instance.model.api.IIdType theId, org.hl7.fhir.instance.model.api.IBaseResource theResource) static <T extends org.hl7.fhir.instance.model.api.IBaseResource>
TinvokeStoragePreShowResources(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, T retVal) protected booleanisPagingProviderDatabaseBacked(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) static <T extends org.hl7.fhir.instance.model.api.IBaseResource>
booleanisResourceIdServerAssigned(org.hl7.fhir.instance.model.api.IBaseResource theResource) <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaAddOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaAdd, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaDeleteOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaDel, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaGetOperation(Class<MT> theType, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaGetOperation(Class<MT> theType, org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) protected voidpostUpdateTransaction(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) protected voidpreDelete(T theResourceToDelete, ResourceTable theEntityToDelete, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Subclasses may override to provide behaviour.read(org.hl7.fhir.instance.model.api.IIdType theId) Deprecated.Useread(IIdType, RequestDetails)insteadread(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) read(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, boolean theDeletedOk) readByPid(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid) readByPid(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, boolean theDeletedOk) readEntity(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) protected IBasePersistedResourcereadEntityLatestVersion(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePersistentId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) protected ResourceTablereadEntityLatestVersion(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) reindex(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, ReindexParameters theReindexParameters, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) voidreindex(T theResource, IBasePersistedResource theEntity) voidremoveTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theScheme, String theTerm) voidremoveTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theScheme, String theTerm, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) protected voidrequestReindexForRelatedResources(Boolean theCurrentlyReindexing, List<String> theBase, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) ca.uhn.fhir.rest.api.server.IBundleProvidersearch(SearchParameterMap theParams) Deprecated.Usesearch(SearchParameterMap, RequestDetails)insteadca.uhn.fhir.rest.api.server.IBundleProvidersearch(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) ca.uhn.fhir.rest.api.server.IBundleProvidersearch(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theConditionalOperationTargetOrNull) <PID extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId<?>>
Stream<PID> searchForIdStream(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theConditionalOperationTargetOrNull) List<org.hl7.fhir.instance.model.api.IIdType> searchForResourceIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) searchForResources(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) voidsetIdHelperSvcForUnitTest(IIdHelperService theIdHelperService) protected voidsetOffsetAndCount(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) voidsetRequestPartitionHelperService(IRequestPartitionHelperSvc theRequestPartitionHelperService) voidsetResourceType(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theTableType) voidsetTransactionService(HapiTransactionService theTransactionService) protected final booleanshouldSkipReindex(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) voidstart()protected <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTtoMetaDt(Class<MT> theType, Collection<TagDefinition> tagDefinitions) Deprecated.Useupdate(T, RequestDetails)insteadDeprecated.Useupdate(T, String, RequestDetails)insteadupdate(T theResource, String theMatchUrl, boolean thePerformIndexing, boolean theForceUpdateVersion, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) update(T theResource, String theMatchUrl, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) update(T theResource, String theMatchUrl, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) protected ResourceTableupdateEntityForDelete(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ResourceTable theEntity) ca.uhn.fhir.rest.api.MethodOutcomevalidate(T theResource, org.hl7.fhir.instance.model.api.IIdType theId, String theRawResource, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, ca.uhn.fhir.rest.api.ValidationModeEnum theMode, String theProfile, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) ca.uhn.fhir.context.RuntimeResourceDefinitionGet the resource definition from the criteria which specifies the resource typeprotected voidvalidatePartitionIdMatch(org.hl7.fhir.instance.model.api.IIdType theResourceIdType, RequestPartitionId theRequestPartitionId, ResourceTable theEntity) Validates that the partition ID of the request resource matches the partition ID of the entity.Methods inherited from class ca.uhn.fhir.jpa.dao.BaseHapiFhirDao
addPidToResource, decodeResource, getApplicationContext, getContext, getInterceptorBroadcaster, getStorageSettings, isLogicalReference, parseContentTextIntoWords, populateResourceIntoEntity, postDelete, postPersist, postUpdate, setApplicationContext, setContext, setDaoSearchParamSynchronizer, setDisableIncrementOnUpdateForUnitTest, setEntityManager, setExternallyStoredResourceServiceRegistryForUnitTest, setInterceptorBroadcasterForUnitTest, setJpaStorageResourceParserForUnitTest, setPartitionSettingsForUnitTest, setResourceHistoryCalculator, setResourceHistoryTableDao, setResourceTypeCacheSvc, setSearchParamPresenceSvc, setSearchParamWithInlineReferencesExtractor, setStorageSettingsForUnitTest, setValidationDisabledForUnitTest, shouldDroppedTagBeRemovedOnUpdate, updateEntity, updateHistoryEntity, updateInternal, updateTags, validateMetaCount, validateResourceForStorageMethods inherited from class ca.uhn.fhir.jpa.dao.BaseStorageResourceDao
deleteExpunge, patch, patchInTransaction, validateResourceTypeMethods inherited from class ca.uhn.fhir.jpa.dao.BaseStorageDao
addIssueToOperationOutcomeForAutoCreatedPlaceholder, clearRequestAsProcessingSubRequest, createErrorOperationOutcome, createInfoOperationOutcome, createInfoOperationOutcome, createMethodOutcomeForResourceId, createResourceGoneException, createWarnOperationOutcome, doCallHooks, extractReferencesToAutoVersion, extractReferencesToAvoidReplacement, markRequestAsProcessingSubRequest, populateOperationOutcomeForUpdate, preProcessResourceForStorage, preProcessResourceForStorage, setMyMetaTagSorter, setSearchParamRegistry, toMethodOutcome, toMethodOutcomeLazy, translateRawParameters, verifyResourceIdIsValidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
getContextMethods inherited from interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao
deletePidList, getCurrentVersionId, getReindexJobStatus, patch, patchInTransaction, searchForIds, translateRawParameters
-
Field Details
-
BASE_RESOURCE_NAME
- See Also:
-
myInterceptorBroadcaster
-
myPlatformTransactionManager
@Autowired protected org.springframework.transaction.PlatformTransactionManager myPlatformTransactionManager -
mySearchDao
-
myTransactionService
-
-
Constructor Details
-
BaseHapiFhirResourceDao
public BaseHapiFhirResourceDao()
-
-
Method Details
-
invokeStoragePreShowResources
@Nullable public static <T extends org.hl7.fhir.instance.model.api.IBaseResource> T invokeStoragePreShowResources(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, T retVal) -
invokeStoragePreAccessResources
public static void invokeStoragePreAccessResources(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, org.hl7.fhir.instance.model.api.IIdType theId, org.hl7.fhir.instance.model.api.IBaseResource theResource) -
getTransactionService
- Specified by:
getTransactionServicein classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
setTransactionService
-
getMatchResourceUrlService
- Specified by:
getMatchResourceUrlServicein classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
getStorageResourceParser
- Specified by:
getStorageResourceParserin classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
getDeleteExpungeJobSubmitter
protected ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter getDeleteExpungeJobSubmitter()- Specified by:
getDeleteExpungeJobSubmitterin classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
getRequestPartitionHelperService
- Specified by:
getRequestPartitionHelperServicein classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
getMatchUrlService
- Specified by:
getMatchUrlServicein classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
create
Deprecated.Usecreate(T, RequestDetails)instead- Specified by:
createin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
create
public DaoMethodOutcome create(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
createin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
create
Deprecated.Usecreate(T, String, RequestDetails)instead- Specified by:
createin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
create
public DaoMethodOutcome create(T theResource, String theIfNoneExist, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
createin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
create
public DaoMethodOutcome create(T theResource, String theIfNoneExist, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
createin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
setRequestPartitionHelperService
public void setRequestPartitionHelperService(IRequestPartitionHelperSvc theRequestPartitionHelperService) -
doCreateForPost
protected DaoMethodOutcome doCreateForPost(T theResource, String theIfNoneExist, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, RequestPartitionId theRequestPartitionId) Called for FHIR create (POST) operations -
getMessageSanitized
-
delete
Deprecated.Usedelete(IIdType, RequestDetails)instead- Specified by:
deletein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
delete
public DaoMethodOutcome delete(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
deletein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
delete
public DaoMethodOutcome delete(org.hl7.fhir.instance.model.api.IIdType theId, DeleteConflictList theDeleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
deletein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
deleteByUrl
public DeleteMethodOutcome deleteByUrl(String theUrl, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
deleteByUrlin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
deleteByUrl
public DeleteMethodOutcome deleteByUrl(String theUrl, DeleteConflictList deleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) This method gets called bydeleteByUrl(String, RequestDetails)as well as by transaction processors- Specified by:
deleteByUrlin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
expunge
public <P extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> void expunge(Collection<P> theResourceIds, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
expungein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
deletePidList
@Nonnull public <P extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> DeleteMethodOutcome deletePidList(String theUrl, Collection<P> theResourceIds, DeleteConflictList theDeleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
deletePidListin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
updateEntityForDelete
protected ResourceTable updateEntityForDelete(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ResourceTable theEntity) -
expunge
public ExpungeOutcome expunge(org.hl7.fhir.instance.model.api.IIdType theId, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
expungein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
expunge
public ExpungeOutcome expunge(ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
expungein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
fetchAllVersionsOfResources
public Stream<ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> fetchAllVersionsOfResources(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, Collection<ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> theIds) - Specified by:
fetchAllVersionsOfResourcesin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
forceExpungeInExistingTransaction
public ExpungeOutcome forceExpungeInExistingTransaction(org.hl7.fhir.instance.model.api.IIdType theId, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
forceExpungeInExistingTransactionin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
getResourceName
- Specified by:
getResourceNamein classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
getResourceType
- Specified by:
getResourceTypein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>- Specified by:
getResourceTypein classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
setResourceType
public void setResourceType(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theTableType) -
history
public ca.uhn.fhir.rest.api.server.IBundleProvider history(Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
historyin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
history
public ca.uhn.fhir.rest.api.server.IBundleProvider history(org.hl7.fhir.instance.model.api.IIdType theId, Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Deprecated.- Specified by:
historyin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
history
public ca.uhn.fhir.rest.api.server.IBundleProvider history(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.param.HistorySearchDateRangeParam theHistorySearchDateRangeParam, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
historyin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
isPagingProviderDatabaseBacked
protected boolean isPagingProviderDatabaseBacked(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
requestReindexForRelatedResources
protected void requestReindexForRelatedResources(Boolean theCurrentlyReindexing, List<String> theBase, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
shouldSkipReindex
protected final boolean shouldSkipReindex(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
metaAddOperation
@Transactional public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaAddOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaAdd, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
metaAddOperationin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
doMetaAddOperation
protected <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> void doMetaAddOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaAdd, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId) -
metaDeleteOperation
@Transactional public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaDeleteOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaDel, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
metaDeleteOperationin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
doMetaDeleteOperation
@Transactional public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> void doMetaDeleteOperation(org.hl7.fhir.instance.model.api.IIdType theResourceId, MT theMetaDel, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, RequestPartitionId theRequestPartitionId) -
metaGetOperation
public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaGetOperation(Class<MT> theType, org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
metaGetOperationin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
metaGetOperation
@Transactional public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaGetOperation(Class<MT> theType, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
metaGetOperationin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
start
- Overrides:
startin classBaseHapiFhirDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
preDelete
protected void preDelete(T theResourceToDelete, ResourceTable theEntityToDelete, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Subclasses may override to provide behaviour. Invoked within a delete transaction with the resource that is about to be deleted. -
readByPid
- Specified by:
readByPidin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
readByPid
@Transactional public T readByPid(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, boolean theDeletedOk) - Specified by:
readByPidin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
read
Deprecated.Useread(IIdType, RequestDetails)instead- Specified by:
readin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
read
public T read(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
readin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
read
public T read(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, boolean theDeletedOk) - Specified by:
readin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
readEntity
public BaseHasResource readEntity(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
readEntityin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>- Overrides:
readEntityin classBaseHapiFhirDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
reindex
public ReindexOutcome reindex(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, ReindexParameters theReindexParameters, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
reindexin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
reindex
Deprecated.- Specified by:
reindexin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
readEntityLatestVersion
protected IBasePersistedResource readEntityLatestVersion(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePersistentId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
readEntityLatestVersionin classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
readEntityLatestVersion
@Nonnull protected ResourceTable readEntityLatestVersion(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
readEntityLatestVersionin classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
removeTag
@Transactional public void removeTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theScheme, String theTerm) - Specified by:
removeTagin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
removeTag
@Transactional public void removeTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theScheme, String theTerm, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
removeTagin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
search
Deprecated.Usesearch(SearchParameterMap, RequestDetails)instead- Specified by:
searchin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
search
public ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
searchin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
search
public ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) - Specified by:
searchin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
setOffsetAndCount
protected void setOffsetAndCount(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) -
searchForIds
public List<JpaPid> searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, @Nullable org.hl7.fhir.instance.model.api.IBaseResource theConditionalOperationTargetOrNull) - Specified by:
searchForIdsin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
searchForIdStream
public <PID extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId<?>> Stream<PID> searchForIdStream(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, @Nullable org.hl7.fhir.instance.model.api.IBaseResource theConditionalOperationTargetOrNull) - Specified by:
searchForIdStreamin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
searchForResources
public List<T> searchForResources(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
searchForResourcesin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
searchForResourceIds
public List<org.hl7.fhir.instance.model.api.IIdType> searchForResourceIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
searchForResourceIdsin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
toMetaDt
protected <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT toMetaDt(Class<MT> theType, Collection<TagDefinition> tagDefinitions) -
update
Deprecated.Useupdate(T, RequestDetails)instead- Specified by:
updatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
update
public DaoMethodOutcome update(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
updatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
update
Deprecated.Useupdate(T, String, RequestDetails)instead- Specified by:
updatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
update
public DaoMethodOutcome update(T theResource, String theMatchUrl, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
updatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
update
public DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Specified by:
updatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
update
public DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing, boolean theForceUpdateVersion, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
updatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
postUpdateTransaction
protected void postUpdateTransaction(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) -
doUpdateForUpdateOrPatch
- Overrides:
doUpdateForUpdateOrPatchin classBaseStorageResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
validate
public ca.uhn.fhir.rest.api.MethodOutcome validate(T theResource, org.hl7.fhir.instance.model.api.IIdType theId, String theRawResource, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, ca.uhn.fhir.rest.api.ValidationModeEnum theMode, String theProfile, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) - Specified by:
validatein interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
validateCriteriaAndReturnResourceDefinition
public ca.uhn.fhir.context.RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition(String criteria) Get the resource definition from the criteria which specifies the resource type- Specified by:
validateCriteriaAndReturnResourceDefinitionin interfaceIFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
setIdHelperSvcForUnitTest
-
isResourceIdServerAssigned
public static <T extends org.hl7.fhir.instance.model.api.IBaseResource> boolean isResourceIdServerAssigned(org.hl7.fhir.instance.model.api.IBaseResource theResource) -
validatePartitionIdMatch
protected void validatePartitionIdMatch(@Nonnull org.hl7.fhir.instance.model.api.IIdType theResourceIdType, @Nonnull RequestPartitionId theRequestPartitionId, @Nonnull ResourceTable theEntity) Validates that the partition ID of the request resource matches the partition ID of the entity.If the request is for all partitions, this method does nothing. Otherwise, it checks that the resource type and FHIR ID of the entity match those of the provided resource ID type, and that the partition IDs are equal. If there is a mismatch, an
InvalidRequestExceptionis thrown.- Parameters:
theResourceIdType- The resource ID type being processedtheRequestPartitionId- The partition ID from the requesttheEntity- The entity being updated- Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException- if the partition IDs do not match for the same resource type and FHIR ID
-
create(T, RequestDetails)instead