
Package ca.uhn.fhir.jpa.dao
Class JpaResourceDaoSearchParameter<T extends org.hl7.fhir.instance.model.api.IBaseResource>
java.lang.Object
ca.uhn.fhir.jpa.dao.BaseStorageDao
ca.uhn.fhir.jpa.dao.BaseStorageResourceDao<T>
ca.uhn.fhir.jpa.dao.BaseHapiFhirDao<T>
ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao<T>
ca.uhn.fhir.jpa.dao.JpaResourceDaoSearchParameter<T>
- All Implemented Interfaces:
IDao,IFhirResourceDao<T>,IFhirResourceDaoSearchParameter<T>,IJpaDao<T>,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class JpaResourceDaoSearchParameter<T extends org.hl7.fhir.instance.model.api.IBaseResource>
extends BaseHapiFhirResourceDao<T>
implements IFhirResourceDaoSearchParameter<T>
-
Field Summary
Fields inherited from class ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao
BASE_RESOURCE_NAME, myInterceptorBroadcaster, myPlatformTransactionManager, mySearchDao, myTransactionServiceFields inherited from class ca.uhn.fhir.jpa.dao.BaseHapiFhirDao
cacheTagDefinitionDao, myCodingSpy, myDeleteConflictService, myEntityManager, myIdHelperService, myInMemoryResourceMatcher, myJpaStorageResourceParser, myPartitionSettings, myResourceHistoryCalculator, myResourceHistoryTableDao, myResourceLinkDao, myResourceTableDao, myResourceTagDao, myResourceTypeCacheSvc, mySearchCoordinatorSvc, myTerminologySvc, NS_JPA_PROFILEFields inherited from class ca.uhn.fhir.jpa.dao.BaseStorageResourceDao
STRICT_ERROR_HANDLERFields inherited from class ca.uhn.fhir.jpa.dao.BaseStorageDao
MESSAGE_KEY_DELETE_RESOURCE_ALREADY_DELETED, MESSAGE_KEY_DELETE_RESOURCE_NOT_EXISTING, myFhirContext, myMetaTagSorter, myResourceVersionSvc, mySearchParamRegistry, myStorageSettings, OO_ISSUE_CODE_INFORMATIONAL, OO_SEVERITY_ERROR, OO_SEVERITY_INFO, OO_SEVERITY_WARNFields inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
CURRENTLY_REINDEXING, RESOURCE_PID, RESOURCE_PID_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpostPersist(ResourceTable theEntity, T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Subclasses may override to provide behaviour.protected voidpostUpdate(ResourceTable theEntity, T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Subclasses may override to provide behaviour.protected voidpreDelete(T theResourceToDelete, ResourceTable theEntityToDelete, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Subclasses may override to provide behaviour.protected voidreindexAffectedResources(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) voidsetSearchParameterDaoValidatorForUnitTest(SearchParameterDaoValidator theSearchParameterDaoValidator) protected voidvalidateResourceForStorage(T theResource, ResourceTable theEntityToSave) This method is invoked immediately before storing a new resource, or an update to an existing resource to allow the DAO to ensure that it is valid for persistence.voidvalidateSearchParam(org.hl7.fhir.instance.model.api.IBaseResource theResource) Methods inherited from class ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao
create, create, create, create, create, delete, delete, delete, deleteByUrl, deleteByUrl, deletePidList, doCreateForPost, doMetaAddOperation, doMetaDeleteOperation, doUpdateForUpdateOrPatch, expunge, expunge, expunge, fetchAllVersionsOfResources, forceExpungeInExistingTransaction, getDeleteExpungeJobSubmitter, getMatchResourceUrlService, getMatchUrlService, getMessageSanitized, getRequestPartitionHelperService, getResourceName, getResourceType, getStorageResourceParser, getTransactionService, history, history, history, invokeStoragePreAccessResources, invokeStoragePreShowResources, isPagingProviderDatabaseBacked, isResourceIdServerAssigned, metaAddOperation, metaDeleteOperation, metaGetOperation, metaGetOperation, postUpdateTransaction, read, read, read, readByPid, readByPid, readEntity, readEntityLatestVersion, readEntityLatestVersion, reindex, reindex, removeTag, removeTag, requestReindexForRelatedResources, search, search, search, searchForIds, searchForIdStream, searchForResourceIds, searchForResources, setIdHelperSvcForUnitTest, setOffsetAndCount, setRequestPartitionHelperService, setResourceType, setTransactionService, shouldSkipReindex, start, toMetaDt, update, update, update, update, update, update, updateEntityForDelete, validate, validateCriteriaAndReturnResourceDefinition, validatePartitionIdMatchMethods inherited from class ca.uhn.fhir.jpa.dao.BaseHapiFhirDao
addPidToResource, decodeResource, getApplicationContext, getContext, getInterceptorBroadcaster, getStorageSettings, isLogicalReference, parseContentTextIntoWords, populateResourceIntoEntity, postDelete, setApplicationContext, setContext, setDaoSearchParamSynchronizer, setDisableIncrementOnUpdateForUnitTest, setEntityManager, setExternallyStoredResourceServiceRegistryForUnitTest, setInterceptorBroadcasterForUnitTest, setJpaStorageResourceParserForUnitTest, setPartitionSettingsForUnitTest, setResourceHistoryCalculator, setResourceHistoryTableDao, setResourceTypeCacheSvc, setSearchParamPresenceSvc, setSearchParamWithInlineReferencesExtractor, setStorageSettingsForUnitTest, setValidationDisabledForUnitTest, shouldDroppedTagBeRemovedOnUpdate, updateEntity, updateHistoryEntity, updateInternal, updateTags, validateMetaCountMethods inherited from class ca.uhn.fhir.jpa.dao.BaseStorageResourceDao
deleteExpunge, patch, patchInTransaction, validateResourceTypeMethods inherited from class ca.uhn.fhir.jpa.dao.BaseStorageDao
addIssueToOperationOutcomeForAutoCreatedPlaceholder, clearRequestAsProcessingSubRequest, createErrorOperationOutcome, createInfoOperationOutcome, createInfoOperationOutcome, createMethodOutcomeForResourceId, createResourceGoneException, createWarnOperationOutcome, doCallHooks, extractReferencesToAutoVersion, extractReferencesToAvoidReplacement, markRequestAsProcessingSubRequest, populateOperationOutcomeForUpdate, preProcessResourceForStorage, preProcessResourceForStorage, setMyMetaTagSorter, setSearchParamRegistry, toMethodOutcome, toMethodOutcomeLazy, translateRawParameters, verifyResourceIdIsValidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.jpa.api.dao.IDao
getContextMethods inherited from interface ca.uhn.fhir.jpa.api.dao.IFhirResourceDao
create, create, create, create, create, delete, delete, delete, deleteByUrl, deleteByUrl, deletePidList, deletePidList, expunge, expunge, expunge, fetchAllVersionsOfResources, forceExpungeInExistingTransaction, getCurrentVersionId, getReindexJobStatus, getResourceType, history, history, history, metaAddOperation, metaDeleteOperation, metaGetOperation, metaGetOperation, patch, patchInTransaction, read, read, read, readByPid, readByPid, readEntity, reindex, reindex, removeTag, removeTag, search, search, search, searchForIds, searchForIds, searchForIdStream, searchForResourceIds, searchForResources, translateRawParameters, update, update, update, update, update, update, validate, validateCriteriaAndReturnResourceDefinition
-
Constructor Details
-
JpaResourceDaoSearchParameter
public JpaResourceDaoSearchParameter()
-
-
Method Details
-
reindexAffectedResources
protected void reindexAffectedResources(T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
postPersist
protected void postPersist(ResourceTable theEntity, T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Description copied from class:BaseHapiFhirDaoSubclasses may override to provide behaviour. Called when a resource has been inserted into the database for the first time.- Overrides:
postPersistin classBaseHapiFhirDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>- Parameters:
theEntity- The entity being updated (Do not modify the entity! Undefined behaviour will occur!)theResource- The resource being persistedtheRequestDetails- The request details, needed for partition support
-
postUpdate
protected void postUpdate(ResourceTable theEntity, T theResource, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Description copied from class:BaseHapiFhirDaoSubclasses may override to provide behaviour. Called when a pre-existing resource has been updated in the database- Overrides:
postUpdatein classBaseHapiFhirDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>- Parameters:
theEntity- The resourcetheResource- The resource being persistedtheRequestDetails- The request details, needed for partition support
-
preDelete
protected void preDelete(T theResourceToDelete, ResourceTable theEntityToDelete, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Description copied from class:BaseHapiFhirResourceDaoSubclasses may override to provide behaviour. Invoked within a delete transaction with the resource that is about to be deleted.- Overrides:
preDeletein classBaseHapiFhirResourceDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>
-
validateResourceForStorage
Description copied from class:BaseHapiFhirDaoThis method is invoked immediately before storing a new resource, or an update to an existing resource to allow the DAO to ensure that it is valid for persistence. By default, checks for the "subsetted" tag and rejects resources which have it. Subclasses should call the superclass implementation to preserve this check.- Overrides:
validateResourceForStoragein classBaseHapiFhirDao<T extends org.hl7.fhir.instance.model.api.IBaseResource>- Parameters:
theResource- The resource that is about to be persistedtheEntityToSave- TODO
-
validateSearchParam
-
setSearchParameterDaoValidatorForUnitTest
public void setSearchParameterDaoValidatorForUnitTest(SearchParameterDaoValidator theSearchParameterDaoValidator)
-