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>
,IFhirResourceDaoComposition<T>
,IFhirResourceDaoConceptMap<T>
,IFhirResourceDaoEncounter<T>
,IFhirResourceDaoObservation<T>
,IFhirResourceDaoPatient<T>
,IFhirResourceDaoSearchParameter<T>
,IFhirResourceDaoStructureDefinition<T>
,IFhirResourceDaoSubscription<T>
,IFhirResourceDaoValueSet<T>
- All Known Implementing Classes:
BaseStorageResourceDao
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 TypeMethodDescriptionDeprecated.Deprecated.Usecreate(IBaseResource, 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 theResource) Deprecated.Usedelete(IIdType, RequestDetails)
insteaddelete
(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, 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 listdeleteByUrl
(String theString, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) This method throws an exception if there are delete conflictsdefault <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 theRequest) Deprecated.Deprecated in 6.8.0 - Use and implementdeletePidList(String, Collection, DeleteConflictList, RequestDetails, TransactionDetails)
<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) Delete a list of resource Pidsexpunge
(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 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 String
getCurrentVersionId
(org.hl7.fhir.instance.model.api.IIdType theReferenceElement) Deprecated.use #read(IIdType, RequestDetails) insteaddefault ReindexJobStatus
Returns ReindexJobStatus information object that tells the caller if a reindex job is still in progress or not.ca.uhn.fhir.rest.api.server.IBundleProvider
history
(Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) 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 theRequestDetails) 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 theRequestDetails) Deprecated.<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) Opens a new transaction and performs a patch operationpatchInTransaction
(org.hl7.fhir.instance.model.api.IIdType theId, String theConditionalUrl, boolean thePerformIndexing, 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, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Execute a patch operation within the existing database transactionread
(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 theRequestDetails, boolean theDeletedOk) Should deleted resources be returned successfully.readByPid
(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid) Read a resource by its internal PIDdefault T
readByPid
(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, boolean theDeletedOk) Read a resource by its internal PIDreadEntity
(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Read an entity from the database, and return it.reindex
(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId theResourcePersistentId, ReindexParameters theReindexParameters, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Reindex the given resourcevoid
reindex
(T theResource, IBasePersistedResource theEntity) void
removeTag
(org.hl7.fhir.instance.model.api.IIdType theId, TagTypeEnum theTagType, String theSystem, String theCode) void
removeTag
(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.IBundleProvider
search
(SearchParameterMap theParams) Deprecated.Usesearch(SearchParameterMap, RequestDetails)
insteadca.uhn.fhir.rest.api.server.IBundleProvider
search
(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) *ca.uhn.fhir.rest.api.server.IBundleProvider
search
(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, jakarta.servlet.http.HttpServletResponse theServletResponse) *default <PT extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
List<PT> searchForIds
(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Search for IDs for processing a match URLs, etc.default <PT extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
List<PT> 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.default <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) Search results matching theParams.default List
<org.hl7.fhir.instance.model.api.IIdType> searchForResourceIds
(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Return the FHIR Ids matching theParams.searchForResources
(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Return all search results matching theParams.void
translateRawParameters
(Map<String, List<String>> theSource, SearchParameterMap theTarget) Takes a map of incoming raw search parameters and translates/parses them into appropriateIQueryParameterType
instances of the appropriate type for the given paramDeprecated.Useupdate(T, RequestDetails)
insteadDeprecated.Useupdate(T, String, RequestDetails)
insteadupdate
(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.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!ca.uhn.fhir.context.RuntimeResourceDefinition
Methods inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
getContext
-
Method Details
-
create
Deprecated.Usecreate(IBaseResource, RequestDetails)
insteadCreate a resource - Note that this variant of the method does not take in aRequestDetails
and therefore can not fire any interceptors. -
create
DaoMethodOutcome create(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
create
Deprecated.Usecreate(IBaseResource, String, RequestDetails)
insteadCreate a resource - Note that this variant of the method does not take in aRequestDetails
and therefore can not fire any interceptors. -
create
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) - 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
- The request details including permissions and partitioning information
-
create
DaoMethodOutcome create(T theResource, String theIfNoneExist, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
delete
Deprecated.Usedelete(IIdType, RequestDetails)
insteadDelete a resource - Note that this variant of the method does not take in aRequestDetails
and therefore can not fire any interceptors. -
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, @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- Since:
- 6.8.0
-
deleteByUrl
DeleteMethodOutcome deleteByUrl(String theString, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) This method throws an exception if there are delete conflicts -
deletePidList
default <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 theRequest) Deprecated.Deprecated in 6.8.0 - Use and implementdeletePidList(String, Collection, DeleteConflictList, RequestDetails, TransactionDetails)
-
deletePidList
<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) Delete a list of resource PidsCAUTION: This list does not throw an exception if there are delete conflicts. It should always be followed by a call to DeleteConflictUtil.validateDeleteConflictsEmptyOrThrowException(fhirContext, conflicts); to actually throw the exception. The reason this method doesn't do that itself is that it is expected to be called repeatedly where an earlier conflict can be removed in a subsequent pass.
- Parameters:
theUrl
- the original URL that triggered the deletiontheResourceIds
- the ids of the resources to be deletedtheDeleteConflicts
- out parameter of conflicts preventing deletiontheRequestDetails
- the request that initiated the request- Returns:
- response back to the client
- Since:
- 6.8.0
-
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) -
expunge
<P extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> void expunge(Collection<P> theResourceIds, 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
@Deprecated(since="6.2") 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 theRequestDetails) Deprecated. -
history
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 theRequestDetails) -
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
- The request details including permissions and partitioning information
-
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
- The request details including permissions and partitioning information
-
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
- The request details including permissions and partitioning information
-
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
- The request details including permissions and partitioning information
-
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) Opens a new transaction and performs a patch operation -
patchInTransaction
DaoMethodOutcome patchInTransaction(org.hl7.fhir.instance.model.api.IIdType theId, String theConditionalUrl, boolean thePerformIndexing, 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, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Execute a patch operation within the existing database transaction -
read
Deprecated.Useread(IIdType, RequestDetails)
insteadRead a resource - Note that this variant of the method does not take in aRequestDetails
and therefore can not fire any interceptors. -
readByPid
Read a resource by its internal PID- Throws:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException
- If the ID is not known to the serverca.uhn.fhir.rest.server.exceptions.ResourceGoneException
- If the resource has been deleted
-
readByPid
default T readByPid(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, boolean theDeletedOk) Read a resource by its internal PID- Throws:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException
- If the ID is not known to the serverca.uhn.fhir.rest.server.exceptions.ResourceGoneException
- If the resource has been deleted and theDeletedOk is true
-
read
T read(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) - Parameters:
theRequestDetails
- The request details including permissions and partitioning information- Throws:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException
- If the ID is not known to the serverca.uhn.fhir.rest.server.exceptions.ResourceGoneException
- If the resource has been deleted
-
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.- Throws:
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException
- If the ID is not known to the serverca.uhn.fhir.rest.server.exceptions.ResourceGoneException
- If the resource has been deleted and theDeletedOk is true
-
readEntity
IBasePersistedResource readEntity(org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Read an entity from the database, and return it. Note that here we're talking about whatever the native database representation is, not the parsedIBaseResource
instance.- Parameters:
theId
- The resource ID to fetchtheRequest
- The request details object associated with the request
-
reindex
Deprecated.Updates index tables associated with the given resource. Does not create a new version or update the resource's update time.- Parameters:
theResource
- The FHIR resource object corresponding to the entity to reindextheEntity
- The storage entity to reindex
-
reindex
ReindexOutcome reindex(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId theResourcePersistentId, ReindexParameters theReindexParameters, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) Reindex the given resource- Parameters:
theResourcePersistentId
- The ID- Returns:
-
getReindexJobStatus
Returns ReindexJobStatus information object that tells the caller if a reindex job is still in progress or not. If the implementing DAO requires additional work during reindexing, this is the method to override. -
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
ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams) throws ca.uhn.fhir.rest.server.exceptions.InvalidRequestException Deprecated.Usesearch(SearchParameterMap, RequestDetails)
instead- Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
- If a SearchParameter is not known to the server
-
search
ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) throws ca.uhn.fhir.rest.server.exceptions.InvalidRequestException *- Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
- If a SearchParameter is not known to the server
-
search
ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, jakarta.servlet.http.HttpServletResponse theServletResponse) throws ca.uhn.fhir.rest.server.exceptions.InvalidRequestException *- Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
- If a SearchParameter is not known to the server
-
searchForIds
default <PT extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> List<PT> searchForIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Search for IDs for processing a match URLs, etc. -
searchForIds
default <PT extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId> List<PT> 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
-
searchForIdStream
default <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) Search results matching theParams. This call does not currently invoke any interceptors, so should only be used for infrastructure that will not need to participate in the consent services, or caching. The Stream MUST be closed to avoid leaking resources. If called within a transaction, the Stream will fail if passed outside the tx boundary.- Parameters:
theParams
- the searchtheRequest
- for partition target info- Returns:
- a Stream that MUST only be used within the calling transaction.
-
searchForResources
default List<T> searchForResources(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Return all search results matching theParams. Will load all resources into ram, so not appropriate for large data sets. This call invokes both preaccess and preshow interceptors.- Parameters:
theParams
- the searchtheRequest
- for partition target info
-
searchForResourceIds
default List<org.hl7.fhir.instance.model.api.IIdType> searchForResourceIds(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest) Return the FHIR Ids matching theParams. This call does not currently invoke any interceptors, so should only be used for infrastructure that will not need to participate in the consent services, or caching.- Parameters:
theParams
- the searchtheRequest
- for partition target info
-
translateRawParameters
Takes a map of incoming raw search parameters and translates/parses them into appropriateIQueryParameterType
instances 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
Deprecated.Useupdate(T, RequestDetails)
insteadUpdate a resource - Note that this variant of the method does not take in aRequestDetails
and therefore can not fire any interceptors. -
update
DaoMethodOutcome update(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
update
Deprecated.Useupdate(T, String, RequestDetails)
insteadUpdate a resource - Note that this variant of the method does not take in aRequestDetails
and therefore can not fire any interceptors. -
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
- The request details including permissions and partitioning information
-
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
- The request details including permissions and partitioning information- Returns:
- MethodOutcome even if the resource fails validation it should still successfully return with a response status of 200
-
validateCriteriaAndReturnResourceDefinition
ca.uhn.fhir.context.RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition(String criteria) -
getCurrentVersionId
Deprecated.use #read(IIdType, RequestDetails) instead
-
create(IBaseResource, RequestDetails)
instead