Class BaseHapiFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>

    • Method Detail

      • create

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome create​(T theResource)
        Specified by:
        create in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • create

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome create​(T theResource,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        create in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • create

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome create​(T theResource,
                                                                 String theIfNoneExist)
        Specified by:
        create in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • create

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome create​(T theResource,
                                                                 String theIfNoneExist,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        create in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • create

        public ca.uhn.fhir.jpa.api.model.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)
        Specified by:
        create in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • delete

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome delete​(org.hl7.fhir.instance.model.api.IIdType theId)
        Specified by:
        delete in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • delete

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome delete​(org.hl7.fhir.instance.model.api.IIdType theId,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        delete in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • delete

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome delete​(org.hl7.fhir.instance.model.api.IIdType theId,
                                                                 ca.uhn.fhir.jpa.api.model.DeleteConflictList theDeleteConflicts,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails,
                                                                 @Nonnull
                                                                 ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)
        Specified by:
        delete in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • deleteByUrl

        public ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome deleteByUrl​(String theUrl,
                                                                         ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        deleteByUrl in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • deleteByUrl

        public ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome deleteByUrl​(String theUrl,
                                                                         ca.uhn.fhir.jpa.api.model.DeleteConflictList deleteConflicts,
                                                                         ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        This method gets called by deleteByUrl(String, RequestDetails) as well as by transaction processors
        Specified by:
        deleteByUrl in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • deletePidList

        @Nonnull
        public ca.uhn.fhir.jpa.api.model.DeleteMethodOutcome deletePidList​(String theUrl,
                                                                           Collection<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> theResourceIds,
                                                                           ca.uhn.fhir.jpa.api.model.DeleteConflictList theDeleteConflicts,
                                                                           ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        deletePidList in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • expunge

        @Transactional(propagation=NEVER)
        public ca.uhn.fhir.jpa.api.model.ExpungeOutcome expunge​(org.hl7.fhir.instance.model.api.IIdType theId,
                                                                ca.uhn.fhir.jpa.api.model.ExpungeOptions theExpungeOptions,
                                                                ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        expunge in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • forceExpungeInExistingTransaction

        public ca.uhn.fhir.jpa.api.model.ExpungeOutcome forceExpungeInExistingTransaction​(org.hl7.fhir.instance.model.api.IIdType theId,
                                                                                          ca.uhn.fhir.jpa.api.model.ExpungeOptions theExpungeOptions,
                                                                                          ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        forceExpungeInExistingTransaction in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • expunge

        @Transactional(propagation=NEVER)
        public ca.uhn.fhir.jpa.api.model.ExpungeOutcome expunge​(ca.uhn.fhir.jpa.api.model.ExpungeOptions theExpungeOptions,
                                                                ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        expunge in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • getResourceType

        public Class<TgetResourceType()
        Specified by:
        getResourceType in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • setResourceType

        public void setResourceType​(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theTableType)
      • history

        @Transactional
        public ca.uhn.fhir.rest.api.server.IBundleProvider history​(Date theSince,
                                                                   Date theUntil,
                                                                   Integer theOffset,
                                                                   ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        history in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • history

        @Transactional
        public ca.uhn.fhir.rest.api.server.IBundleProvider history​(org.hl7.fhir.instance.model.api.IIdType theId,
                                                                   Date theSince,
                                                                   Date theUntil,
                                                                   Integer theOffset,
                                                                   ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        history in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • metaAddOperation

        @Transactional
        public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaAddOperation​(org.hl7.fhir.instance.model.api.IIdType theResourceId,
                                                                                              MT theMetaAdd,
                                                                                              ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        metaAddOperation in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • metaDeleteOperation

        @Transactional
        public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaDeleteOperation​(org.hl7.fhir.instance.model.api.IIdType theResourceId,
                                                                                                 MT theMetaDel,
                                                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        metaDeleteOperation in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • metaGetOperation

        @Transactional
        public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaGetOperation​(Class<MT> theType,
                                                                                              org.hl7.fhir.instance.model.api.IIdType theId,
                                                                                              ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        metaGetOperation in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • metaGetOperation

        @Transactional
        public <MT extends org.hl7.fhir.instance.model.api.IBaseMetaType> MT metaGetOperation​(Class<MT> theType,
                                                                                              ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        metaGetOperation in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • patch

        public ca.uhn.fhir.jpa.api.model.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 theRequest)
        Specified by:
        patch in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • preDelete

        protected void preDelete​(T theResourceToDelete,
                                 ResourceTable theEntityToDelete)
        Subclasses may override to provide behaviour. Invoked within a delete transaction with the resource that is about to be deleted.
      • readByPid

        @Transactional
        public T readByPid​(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid)
        Specified by:
        readByPid in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • readByPid

        @Transactional
        public T readByPid​(ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId thePid,
                           boolean theDeletedOk)
        Specified by:
        readByPid in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • read

        public T read​(org.hl7.fhir.instance.model.api.IIdType theId)
        Specified by:
        read in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • read

        public T read​(org.hl7.fhir.instance.model.api.IIdType theId,
                      ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        read in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • read

        public T read​(org.hl7.fhir.instance.model.api.IIdType theId,
                      ca.uhn.fhir.rest.api.server.RequestDetails theRequest,
                      boolean theDeletedOk)
        Specified by:
        read in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • doRead

        public T doRead​(org.hl7.fhir.instance.model.api.IIdType theId,
                        ca.uhn.fhir.rest.api.server.RequestDetails theRequest,
                        boolean theDeletedOk)
      • readEntity

        @Transactional
        public BaseHasResource readEntity​(org.hl7.fhir.instance.model.api.IIdType theId,
                                          ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        readEntity in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
        Overrides:
        readEntity in class BaseHapiFhirDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • getCurrentVersionId

        @Transactional
        public String getCurrentVersionId​(org.hl7.fhir.instance.model.api.IIdType theReferenceElement)
        Specified by:
        getCurrentVersionId in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • readEntity

        @Transactional
        public BaseHasResource readEntity​(org.hl7.fhir.instance.model.api.IIdType theId,
                                          boolean theCheckForForcedId,
                                          ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        readEntity in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • readEntityLatestVersion

        @Nonnull
        protected ResourceTable readEntityLatestVersion​(org.hl7.fhir.instance.model.api.IIdType theId,
                                                        ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails,
                                                        ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)
      • reindex

        public void reindex​(T theResource,
                            ResourceTable theEntity)
        Specified by:
        reindex in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • removeTag

        @Transactional
        public void removeTag​(org.hl7.fhir.instance.model.api.IIdType theId,
                              TagTypeEnum theTagType,
                              String theScheme,
                              String theTerm)
        Specified by:
        removeTag in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • removeTag

        @Transactional
        public void removeTag​(org.hl7.fhir.instance.model.api.IIdType theId,
                              TagTypeEnum theTagType,
                              String theScheme,
                              String theTerm,
                              ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        removeTag in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • search

        @Transactional(propagation=SUPPORTS)
        public ca.uhn.fhir.rest.api.server.IBundleProvider search​(SearchParameterMap theParams)
        Specified by:
        search in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • search

        @Transactional(propagation=SUPPORTS)
        public ca.uhn.fhir.rest.api.server.IBundleProvider search​(SearchParameterMap theParams,
                                                                  ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        search in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • search

        @Transactional(propagation=SUPPORTS)
        public ca.uhn.fhir.rest.api.server.IBundleProvider search​(SearchParameterMap theParams,
                                                                  ca.uhn.fhir.rest.api.server.RequestDetails theRequest,
                                                                  javax.servlet.http.HttpServletResponse theServletResponse)
        Specified by:
        search in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • searchForIds

        public 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)
        Specified by:
        searchForIds in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • update

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome update​(T theResource)
        Specified by:
        update in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • update

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome update​(T theResource,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        update in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • update

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome update​(T theResource,
                                                                 String theMatchUrl)
        Specified by:
        update in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • update

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome update​(T theResource,
                                                                 String theMatchUrl,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        update in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • update

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome update​(T theResource,
                                                                 String theMatchUrl,
                                                                 boolean thePerformIndexing,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
        Specified by:
        update in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • update

        public ca.uhn.fhir.jpa.api.model.DaoMethodOutcome update​(T theResource,
                                                                 String theMatchUrl,
                                                                 boolean thePerformIndexing,
                                                                 boolean theForceUpdateVersion,
                                                                 ca.uhn.fhir.rest.api.server.RequestDetails theRequest,
                                                                 @Nonnull
                                                                 ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)
        Specified by:
        update in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • validate

        @Transactional(propagation=SUPPORTS)
        public ca.uhn.fhir.rest.api.MethodOutcome validate​(T theResource,
                                                           org.hl7.fhir.instance.model.api.IIdType theId,
                                                           String theRawResource,
                                                           ca.uhn.fhir.rest.api.EncodingEnum theEncoding,
                                                           ca.uhn.fhir.rest.api.ValidationModeEnum theMode,
                                                           String theProfile,
                                                           ca.uhn.fhir.rest.api.server.RequestDetails theRequest)
        Specified by:
        validate in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
      • validateCriteriaAndReturnResourceDefinition

        public ca.uhn.fhir.context.RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition​(String criteria)
        Get the resource definition from the criteria which specifies the resource type
        Specified by:
        validateCriteriaAndReturnResourceDefinition in interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>