Package ca.uhn.fhir.jpa.interceptor
Class OverridePathBasedReferentialIntegrityForDeletesInterceptor
java.lang.Object
ca.uhn.fhir.jpa.interceptor.OverridePathBasedReferentialIntegrityForDeletesInterceptor
This JPA interceptor can be configured with a collection of FHIRPath expressions, and will disable
referential integrity for target resources at those paths.
For example, suppose this interceptor is configured with a path of AuditEvent.entity.what
,
and an AuditEvent resource exists in the repository that has a reference in that path to resource
Patient/123
. Normally this reference would prevent the Patient resource from being deleted unless
the AuditEvent was first deleted as well (or a cascading delete was used).
With this interceptor in place, the Patient resource could be deleted, and the AuditEvent would remain intact.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a FHIRPath expression indicating a resource path that should be ignored when considering referential integrity for deletes.void
Remove all paths registered to this interceptorgetPaths()
Returns the paths that will be considered by this interceptorvoid
handleDeleteConflicts
(DeleteConflictList theDeleteConflictList, ca.uhn.fhir.rest.api.server.RequestDetails requestDetails) Interceptor hook method.
-
Constructor Details
-
OverridePathBasedReferentialIntegrityForDeletesInterceptor
Constructor
-
-
Method Details
-
addPath
Adds a FHIRPath expression indicating a resource path that should be ignored when considering referential integrity for deletes.- Parameters:
thePath
- The FHIRPath expression, e.g.AuditEvent.agent.who
-
clearPaths
Remove all paths registered to this interceptor -
getPaths
Returns the paths that will be considered by this interceptor- See Also:
-
handleDeleteConflicts
public void handleDeleteConflicts(DeleteConflictList theDeleteConflictList, ca.uhn.fhir.rest.api.server.RequestDetails requestDetails) Interceptor hook method. Do not invoke directly.
-