Package ca.uhn.fhir.jpa.dao
Class BaseStorageDao
java.lang.Object
ca.uhn.fhir.jpa.dao.BaseStorageDao
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DaoConfigprotected DaoRegistryprotected ca.uhn.fhir.context.FhirContextprotected ModelConfigprotected IResourceVersionSvcprotected ca.uhn.fhir.rest.server.util.ISearchParamRegistrystatic Stringstatic Stringstatic String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearRequestAsProcessingSubRequest(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)org.hl7.fhir.instance.model.api.IBaseOperationOutcomecreateErrorOperationOutcome(String theMessage, String theCode)org.hl7.fhir.instance.model.api.IBaseOperationOutcomecreateInfoOperationOutcome(String theMessage)protected ca.uhn.fhir.rest.server.exceptions.ResourceGoneExceptioncreateResourceGoneException(IBasePersistedResource theResourceEntity)protected voiddoCallHooks(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.interceptor.api.Pointcut thePointcut, ca.uhn.fhir.interceptor.api.HookParams theParams)static Set<org.hl7.fhir.instance.model.api.IBaseReference>extractReferencesToAutoVersion(ca.uhn.fhir.context.FhirContext theFhirContext, ModelConfig theModelConfig, org.hl7.fhir.instance.model.api.IBaseResource theResource)protected abstract DaoConfigProvide the DaoConfigprotected abstract ca.uhn.fhir.context.FhirContextProvides the FHIR contextprotected abstract ca.uhn.fhir.interceptor.api.IInterceptorBroadcasterprotected abstract StringReturns the resource type for this DAO, or null if this is a system-level DAOstatic voidmarkRequestAsProcessingSubRequest(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)voidnotifyInterceptors(ca.uhn.fhir.rest.api.RestOperationTypeEnum theOperationType, ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails theRequestDetails)protected voidpreProcessResourceForStorage(org.hl7.fhir.instance.model.api.IBaseResource theResource)Deprecated.protected voidpreProcessResourceForStorage(org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, boolean thePerformIndexing)May be overridden by subclasses to validate resources prior to storagevoidsetSearchParamRegistry(ca.uhn.fhir.rest.server.util.ISearchParamRegistry theSearchParamRegistry)protected DaoMethodOutcometoMethodOutcome(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, IBasePersistedResource theEntity, org.hl7.fhir.instance.model.api.IBaseResource theResource)protected DaoMethodOutcometoMethodOutcomeLazy(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId theResourcePersistentId, Supplier<LazyDaoMethodOutcome.EntityAndResource> theEntity, Supplier<org.hl7.fhir.instance.model.api.IIdType> theIdSupplier)voidtranslateRawParameters(Map<String,List<String>> theSource, SearchParameterMap theTarget)
-
Field Details
-
OO_SEVERITY_ERROR
- See Also:
- Constant Field Values
-
OO_SEVERITY_INFO
- See Also:
- Constant Field Values
-
OO_SEVERITY_WARN
- See Also:
- Constant Field Values
-
mySearchParamRegistry
-
myFhirContext
-
myDaoRegistry
-
myModelConfig
-
myResourceVersionSvc
-
myDaoConfig
-
-
Constructor Details
-
BaseStorageDao
public BaseStorageDao()
-
-
Method Details
-
extractReferencesToAutoVersion
@Nonnull public static Set<org.hl7.fhir.instance.model.api.IBaseReference> extractReferencesToAutoVersion(ca.uhn.fhir.context.FhirContext theFhirContext, ModelConfig theModelConfig, org.hl7.fhir.instance.model.api.IBaseResource theResource) -
clearRequestAsProcessingSubRequest
public static void clearRequestAsProcessingSubRequest(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
markRequestAsProcessingSubRequest
public static void markRequestAsProcessingSubRequest(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
setSearchParamRegistry
public void setSearchParamRegistry(ca.uhn.fhir.rest.server.util.ISearchParamRegistry theSearchParamRegistry) -
preProcessResourceForStorage
protected void preProcessResourceForStorage(org.hl7.fhir.instance.model.api.IBaseResource theResource)Deprecated.May be overridden by subclasses to validate resources prior to storage- Parameters:
theResource- The resource that is about to be stored
-
preProcessResourceForStorage
protected void preProcessResourceForStorage(org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, boolean thePerformIndexing)May be overridden by subclasses to validate resources prior to storage- Parameters:
theResource- The resource that is about to be stored- Since:
- 5.3.0
-
toMethodOutcome
protected DaoMethodOutcome toMethodOutcome(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, @Nonnull IBasePersistedResource theEntity, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource) -
toMethodOutcomeLazy
protected DaoMethodOutcome toMethodOutcomeLazy(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId theResourcePersistentId, @Nonnull Supplier<LazyDaoMethodOutcome.EntityAndResource> theEntity, Supplier<org.hl7.fhir.instance.model.api.IIdType> theIdSupplier) -
doCallHooks
protected void doCallHooks(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.interceptor.api.Pointcut thePointcut, ca.uhn.fhir.interceptor.api.HookParams theParams) -
getInterceptorBroadcaster
-
createErrorOperationOutcome
public org.hl7.fhir.instance.model.api.IBaseOperationOutcome createErrorOperationOutcome(String theMessage, String theCode) -
createInfoOperationOutcome
public org.hl7.fhir.instance.model.api.IBaseOperationOutcome createInfoOperationOutcome(String theMessage) -
createResourceGoneException
@Nonnull protected ca.uhn.fhir.rest.server.exceptions.ResourceGoneException createResourceGoneException(IBasePersistedResource theResourceEntity) -
getConfig
Provide the DaoConfig -
getResourceName
Returns the resource type for this DAO, or null if this is a system-level DAO -
getContext
Provides the FHIR context -
translateRawParameters
@Transactional(propagation=SUPPORTS) public void translateRawParameters(Map<String,List<String>> theSource, SearchParameterMap theTarget) -
notifyInterceptors
public void notifyInterceptors(ca.uhn.fhir.rest.api.RestOperationTypeEnum theOperationType, ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails theRequestDetails)
-
preProcessResourceForStorage(IBaseResource, RequestDetails, TransactionDetails, boolean)instead