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 Type
    Method
    Description
    create​(T theResource)
    Create a resource - Note that this variant of the method does not take in a RequestDetails and therefore can not fire any interceptors.
    create​(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
     
    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​(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 a RequestDetails and 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 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)
    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
    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
    expunge​(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 String
    getCurrentVersionId​(org.hl7.fhir.instance.model.api.IIdType theReferenceElement)
    Returns the current version ID for the given resource
     
    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, 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)
     
    read​(org.hl7.fhir.instance.model.api.IIdType theId)
    Read a resource - Note that this variant of the method does not take in a RequestDetails and 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 PID
    default T
    readByPid​(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid, boolean theDeletedOk)
    Read a resource by its internal PID
    readEntity​(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)
     
    void
    reindex​(T theResource, ResourceTable theEntity)
    Updates index tables associated with the given resource.
    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)
     
    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, javax.servlet.http.HttpServletResponse theServletResponse)
     
    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.
    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)
    Update a resource - Note that this variant of the method does not take in a RequestDetails and therefore can not fire any interceptors.
    update​(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
     
    update​(T theResource, String theMatchUrl)
    Update a resource - Note that this variant of the method does not take in a RequestDetails and 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.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, toResource, toResource
  • Method Details

    • create

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

      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. 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

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

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

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

      T readByPid(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid)
      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

      void reindex(T theResource, ResourceTable theEntity)
      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

      ca.uhn.fhir.rest.api.server.IBundleProvider search(SearchParameterMap theParams)
    • 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

      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.
    • translateRawParameters

      void translateRawParameters(Map<String,​List<String>> theSource, SearchParameterMap theTarget)
      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)
      Update a resource - Note that this variant of the method does not take in a RequestDetails and 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

      DaoMethodOutcome update(T theResource, String theMatchUrl)
      Update a resource - Note that this variant of the method does not take in a RequestDetails and 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 delete
      theResourceIds - the ids of the resources to be deleted
      theDeleteConflicts - out parameter of conflicts preventing deletion
      theRequest - the request that initiated the request
      Returns:
      response back to the client
    • getCurrentVersionId

      default String getCurrentVersionId(org.hl7.fhir.instance.model.api.IIdType theReferenceElement)
      Returns the current version ID for the given resource