Package ca.uhn.fhir.jpa.search
Class ResourceSearchUrlSvc
java.lang.Object
ca.uhn.fhir.jpa.search.ResourceSearchUrlSvc
This service ensures uniqueness of resources during create or create-on-update
by storing the resource searchUrl.
- See Also:
-
Constructor Summary
ConstructorDescriptionResourceSearchUrlSvc
(jakarta.persistence.EntityManager theEntityManager, IResourceSearchUrlDao theResourceSearchUrlDao, MatchUrlService theMatchUrlService, ca.uhn.fhir.context.FhirContext theFhirContext, PartitionSettings thePartitionSettings) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteByResId
(JpaPid theResId) Once a resource is updated or deleted, we can trust that future match checks will find the committed resource in the db.void
deleteByResIds
(List<Long> theResIds) void
deleteEntriesOlderThan
(Date theCutoffDate) Perform removal of entries older thantheCutoffDate
since the create operations are done.void
enforceMatchUrlResourceUniqueness
(String theResourceName, String theMatchUrl, ResourceTable theResourceTable) We store a record of match urls with res_id so a db constraint can catch simultaneous creates that slip through.
-
Constructor Details
-
ResourceSearchUrlSvc
public ResourceSearchUrlSvc(jakarta.persistence.EntityManager theEntityManager, IResourceSearchUrlDao theResourceSearchUrlDao, MatchUrlService theMatchUrlService, ca.uhn.fhir.context.FhirContext theFhirContext, PartitionSettings thePartitionSettings)
-
-
Method Details
-
deleteEntriesOlderThan
Perform removal of entries older thantheCutoffDate
since the create operations are done. -
deleteByResId
Once a resource is updated or deleted, we can trust that future match checks will find the committed resource in the db. The use of the constraint table is done, and we can delete it to keep the table small. -
deleteByResIds
-
enforceMatchUrlResourceUniqueness
public void enforceMatchUrlResourceUniqueness(String theResourceName, String theMatchUrl, ResourceTable theResourceTable) We store a record of match urls with res_id so a db constraint can catch simultaneous creates that slip through.
-