Package ca.uhn.fhir.jpa.api.dao
Interface IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
- All Superinterfaces:
IDao
- All Known Subinterfaces:
IFhirResourceDaoCodeSystem<T,CD,CC>,IFhirResourceDaoComposition<T>,IFhirResourceDaoConceptMap<T>,IFhirResourceDaoEncounter<T>,IFhirResourceDaoMessageHeader<T>,IFhirResourceDaoObservation<T>,IFhirResourceDaoPatient<T>,IFhirResourceDaoSearchParameter<T>,IFhirResourceDaoStructureDefinition<T>,IFhirResourceDaoSubscription<T>,IFhirResourceDaoValueSet<T,CD,CC>
public interface IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
extends IDao
Note that this interface is not considered a stable interface. While it is possible to build applications
that use it directly, please be aware that we may modify methods, add methods, or even remove methods from
time to time, even within minor point releases.
-
Field Summary
Fields inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
CURRENTLY_REINDEXING, RESOURCE_PID, RESOURCE_PID_KEY -
Method Summary
Modifier and TypeMethodDescriptionCreate a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors.Create a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors.create(T theResource, String theIfNoneExist, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)create(T theResource, String theIfNoneExist, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)delete(org.hl7.fhir.instance.model.api.IIdType theResource)Delete a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors.delete(org.hl7.fhir.instance.model.api.IIdType theResource, DeleteConflictList theDeleteConflictsListToPopulate, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)This method does not throw an exception if there are delete conflicts, but populates them in the provided listdelete(org.hl7.fhir.instance.model.api.IIdType theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)This method throws an exception if there are delete conflictsdeleteByUrl(String theUrl, DeleteConflictList theDeleteConflictsListToPopulate, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)This method does not throw an exception if there are delete conflicts, but populates them in the provided listdeleteByUrl(String theString, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)This method throws an exception if there are delete conflictsdeletePidList(String theUrl, Collection<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> theResourceIds, DeleteConflictList theDeleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)Delete a list of resource Pidsexpunge(ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)expunge(org.hl7.fhir.instance.model.api.IIdType theIIdType, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)forceExpungeInExistingTransaction(org.hl7.fhir.instance.model.api.IIdType theId, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)default StringgetCurrentVersionId(org.hl7.fhir.instance.model.api.IIdType theReferenceElement)Returns the current version ID for the given resourceca.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, Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)<MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaAddOperation(org.hl7.fhir.instance.model.api.IIdType theId1, MT theMetaAdd, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)Not supported in DSTU1!<MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaDeleteOperation(org.hl7.fhir.instance.model.api.IIdType theId1, MT theMetaDel, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)Not supported in DSTU1!<MT extends org.hl7.fhir.instance.model.api.IBaseMetaType>
MTmetaGetOperation(Class<MT> theType, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)Not supported in DSTU1!<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 theRequestDetails)Not supported in DSTU1!patch(org.hl7.fhir.instance.model.api.IIdType theId, String theConditionalUrl, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String thePatchBody, org.hl7.fhir.instance.model.api.IBaseParameters theFhirPatchBody, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)read(org.hl7.fhir.instance.model.api.IIdType theId)Read a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors.read(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 theRequestDetails, boolean theDeletedOk)Should deleted resources be returned successfully.readByPid(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid)Read a resource by its internal PIDdefault TreadByPid(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid, boolean theDeletedOk)Read a resource by its internal PIDreadEntity(org.hl7.fhir.instance.model.api.IIdType theId, boolean theCheckForForcedId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)readEntity(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)voidreindex(T theResource, ResourceTable theEntity)Updates index tables associated with the given resource.voidremoveTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theSystem, String theCode)voidremoveTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theSystem, String theCode, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)ca.uhn.fhir.rest.api.server.IBundleProvidersearch(SearchParameterMap theParams)ca.uhn.fhir.rest.api.server.IBundleProvidersearch(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)ca.uhn.fhir.rest.api.server.IBundleProvidersearch(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, javax.servlet.http.HttpServletResponse theServletResponse)default Set<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId>searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)Search for IDs for processing a match URLs, etc.default Set<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId>searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theConditionalOperationTargetOrNull)Search for IDs for processing a match URLs, etc.voidtranslateRawParameters(Map<String,List<String>> theSource, SearchParameterMap theTarget)Takes a map of incoming raw search parameters and translates/parses them into appropriateIQueryParameterTypeinstances of the appropriate type for the given paramUpdate a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors.Update a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors.update(T theResource, String theMatchUrl, boolean thePerformIndexing, boolean theForceUpdateVersion, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, 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)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 theRequestDetails)Not supported in DSTU1!ca.uhn.fhir.context.RuntimeResourceDefinitionMethods inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
getContext, toResource, toResource
-
Method Details
-
create
Create a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors. Use only for internal system calls -
create
DaoMethodOutcome create(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
create
Create a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors. Use only for internal system calls -
create
DaoMethodOutcome create(T theResource, String theIfNoneExist, boolean thePerformIndexing, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)- Parameters:
thePerformIndexing- Use with caution! If you set this to false, you need to manually perform indexing or your resources won't be indexed and searches won't work.theRequestDetails- TODO
-
create
DaoMethodOutcome create(T theResource, String theIfNoneExist, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
delete
Delete a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors. Use only for internal system calls -
delete
DaoMethodOutcome delete(org.hl7.fhir.instance.model.api.IIdType theResource, DeleteConflictList theDeleteConflictsListToPopulate, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)This method does not throw an exception if there are delete conflicts, but populates them in the provided list -
delete
DaoMethodOutcome delete(org.hl7.fhir.instance.model.api.IIdType theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)This method throws an exception if there are delete conflicts -
deleteByUrl
DeleteMethodOutcome deleteByUrl(String theUrl, DeleteConflictList theDeleteConflictsListToPopulate, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)This method does not throw an exception if there are delete conflicts, but populates them in the provided list -
deleteByUrl
DeleteMethodOutcome deleteByUrl(String theString, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)This method throws an exception if there are delete conflicts -
expunge
ExpungeOutcome expunge(ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
expunge
ExpungeOutcome expunge(org.hl7.fhir.instance.model.api.IIdType theIIdType, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) -
forceExpungeInExistingTransaction
ExpungeOutcome forceExpungeInExistingTransaction(org.hl7.fhir.instance.model.api.IIdType theId, ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) -
getResourceType
-
history
-
history
-
metaAddOperation
<MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaAddOperation(org.hl7.fhir.instance.model.api.IIdType theId1, MT theMetaAdd, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)Not supported in DSTU1!- Parameters:
theRequestDetails- TODO
-
metaDeleteOperation
<MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaDeleteOperation(org.hl7.fhir.instance.model.api.IIdType theId1, MT theMetaDel, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)Not supported in DSTU1!- Parameters:
theRequestDetails- TODO
-
metaGetOperation
<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 theRequestDetails)Not supported in DSTU1!- Parameters:
theRequestDetails- TODO
-
metaGetOperation
<MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaGetOperation(Class<MT> theType, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)Not supported in DSTU1!- Parameters:
theRequestDetails- TODO
-
patch
DaoMethodOutcome patch(org.hl7.fhir.instance.model.api.IIdType theId, String theConditionalUrl, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String thePatchBody, org.hl7.fhir.instance.model.api.IBaseParameters theFhirPatchBody, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
read
Read a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors. Use only for internal system calls -
readByPid
Read a resource by its internal PID -
readByPid
default T readByPid(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid, boolean theDeletedOk)Read a resource by its internal PID -
read
T read(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)- Parameters:
theRequestDetails- TODO- Throws:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException- If the ID is not known to the server
-
read
T read(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, boolean theDeletedOk)Should deleted resources be returned successfully. This should be false for a normal FHIR read. -
readEntity
BaseHasResource readEntity(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) -
readEntity
BaseHasResource readEntity(org.hl7.fhir.instance.model.api.IIdType theId, boolean theCheckForForcedId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)- Parameters:
theCheckForForcedId- If true, this method should fail if the requested ID contains a numeric PID which exists, but is obscured by a "forced ID" so should not exist as far as the outside world is concerned.
-
reindex
Updates index tables associated with the given resource. Does not create a new version or update the resource's update time. -
removeTag
void removeTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theSystem, String theCode, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
removeTag
void removeTag(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theSystem, String theCode) -
search
-
search
ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
search
ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, javax.servlet.http.HttpServletResponse theServletResponse) -
searchForIds
default Set<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)Search for IDs for processing a match URLs, etc. -
searchForIds
default Set<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, @Nullable org.hl7.fhir.instance.model.api.IBaseResource theConditionalOperationTargetOrNull)Search for IDs for processing a match URLs, etc.- Parameters:
theConditionalOperationTargetOrNull- If we're searching for IDs in order to satisfy a conditional create/update, this is the resource being searched for- Since:
- 5.5.0
-
translateRawParameters
Takes a map of incoming raw search parameters and translates/parses them into appropriateIQueryParameterTypeinstances of the appropriate type for the given param- Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException- If any of the parameters are not known
-
update
Update a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors. Use only for internal system calls -
update
DaoMethodOutcome update(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
update
Update a resource - Note that this variant of the method does not take in aRequestDetailsand therefore can not fire any interceptors. Use only for internal system calls -
update
DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)- Parameters:
thePerformIndexing- Use with caution! If you set this to false, you need to manually perform indexing or your resources won't be indexed and searches won't work.theRequestDetails- TODO
-
update
DaoMethodOutcome update(T theResource, String theMatchUrl, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
update
DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing, boolean theForceUpdateVersion, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, @Nonnull ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)- Parameters:
theForceUpdateVersion- Create a new version with the same contents as the current version even if the content hasn't changed (this is mostly useful for resources mapping to external content such as external code systems)
-
validate
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 theRequestDetails)Not supported in DSTU1!- Parameters:
theRequestDetails- TODO
-
validateCriteriaAndReturnResourceDefinition
ca.uhn.fhir.context.RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition(String criteria) -
deletePidList
DeleteMethodOutcome deletePidList(String theUrl, Collection<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> theResourceIds, DeleteConflictList theDeleteConflicts, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)Delete a list of resource Pids- Parameters:
theUrl- the original URL that triggered the deletetheResourceIds- the ids of the resources to be deletedtheDeleteConflicts- out parameter of conflicts preventing deletiontheRequest- the request that initiated the request- Returns:
- response back to the client
-
getCurrentVersionId
Returns the current version ID for the given resource
-