
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
ConstructorsConstructorDescriptionResourceSearchUrlSvc(jakarta.persistence.EntityManager theEntityManager, IResourceSearchUrlDao theResourceSearchUrlDao, MatchUrlService theMatchUrlService, ca.uhn.fhir.context.FhirContext theFhirContext, PartitionSettings thePartitionSettings) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByResId(JpaPid theResId) Once a resource is updated or deleted, we can trust that future match checks will find the committed resource in the db.voiddeleteByResIds(Collection<JpaPid> theResId) Once a resource is updated or deleted, we can trust that future match checks will find the committed resource in the db.voiddeleteEntriesOlderThan(Date theCutoffDate) Perform removal of entries older thantheCutoffDatesince the create operations are done.voidenforceMatchUrlResourceUniqueness(String theResourceName, String theMatchUrl, ResourceTable theResourceTable)
-
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 thantheCutoffDatesince 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
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. -
enforceMatchUrlResourceUniqueness
public void enforceMatchUrlResourceUniqueness(String theResourceName, String theMatchUrl, ResourceTable theResourceTable) - Parameters:
theResourceName- The resource name associated with the conditional URLtheMatchUrl- The URL parameters portion of the match URL. Should not include a leading ?, but can include & separators. We store a record of match urls with res_id so a db constraint can catch simultaneous creates that slip through.
-