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 Type
    Method
    Description
    create(T theResource)
    Deprecated.
    create(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
     
    create(T theResource, String theIfNoneExist)
    create(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.
    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 list
    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(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 list
    deleteByUrl(String theString, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
    This method throws an exception if there are delete conflicts
    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)
    <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 Pids
    expunge(ExpungeOptions theExpungeOptions, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
     
    <P extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
    void
    expunge(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) instead
     
    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)
    <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!
    <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!
    <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!
    <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!
    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(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(org.hl7.fhir.instance.model.api.IIdType theId)
    Deprecated.
    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.IResourcePersistentId thePid)
    Read a resource by its internal PID
    default T
    readByPid(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid, boolean theDeletedOk)
    Read a resource by its internal PID
    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.
    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
    void
    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
    ca.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.
    default List<T>
    searchForResources(SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
    Return all search results matching theParams.
    void
    Takes a map of incoming raw search parameters and translates/parses them into appropriate IQueryParameterType instances of the appropriate type for the given param
    update(T theResource)
    Deprecated.
    update(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
     
    update(T theResource, String theMatchUrl)
    Deprecated.
    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.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

      DaoMethodOutcome create(T theResource)
      Deprecated.
      Create a resource - Note that this variant of the method does not take in a RequestDetails and therefore can not fire any interceptors.
    • create

      DaoMethodOutcome create(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
    • create

      DaoMethodOutcome create(T theResource, String theIfNoneExist)
      Create a resource - Note that this variant of the method does not take in a RequestDetails 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

      DaoMethodOutcome delete(org.hl7.fhir.instance.model.api.IIdType theResource)
      Deprecated.
      Delete a resource - Note that this variant of the method does not take in a RequestDetails 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)
    • 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 Pids

      CAUTION: 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 deletion
      theResourceIds - the ids of the resources to be deleted
      theDeleteConflicts - out parameter of conflicts preventing deletion
      theRequestDetails - 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

      @Nonnull Class<T> getResourceType()
    • history

      ca.uhn.fhir.rest.api.server.IBundleProvider history(Date theSince, Date theUntil, Integer theOffset, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
    • 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)
    • 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

      T read(org.hl7.fhir.instance.model.api.IIdType theId)
      Deprecated.
      Read a resource - Note that this variant of the method does not take in a RequestDetails and therefore can not fire any interceptors.
    • readByPid

      T readByPid(ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId thePid)
      Read a resource by its internal PID
      Throws:
      ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException - If the ID is not known to the server
      ca.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 server
      ca.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 server
      ca.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 server
      ca.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 parsed IBaseResource instance.
      Parameters:
      theId - The resource ID to fetch
      theRequest - The request details object associated with the request
    • reindex

      @Deprecated void reindex(T theResource, IBasePersistedResource theEntity)
      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 reindex
      theEntity - 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:
    • 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
      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 search
      theRequest - 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 search
      theRequest - 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 search
      theRequest - for partition target info
    • translateRawParameters

      Takes a map of incoming raw search parameters and translates/parses them into appropriate IQueryParameterType 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

      DaoMethodOutcome update(T theResource)
      Deprecated.
      Update a resource - Note that this variant of the method does not take in a RequestDetails and therefore can not fire any interceptors.
    • update

      DaoMethodOutcome update(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
    • update

      DaoMethodOutcome update(T theResource, String theMatchUrl)
      Deprecated.
      Update a resource - Note that this variant of the method does not take in a RequestDetails 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

      default String getCurrentVersionId(org.hl7.fhir.instance.model.api.IIdType theReferenceElement)
      Deprecated.
      use #read(IIdType, RequestDetails) instead