From 7ea7bd45cf668496e22cf79c80c8b5cebc6bb77c Mon Sep 17 00:00:00 2001 From: James Date: Tue, 14 Feb 2017 21:09:01 -0500 Subject: [PATCH] Make preDelete consistent with postCreate --- .../java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java | 5 +++-- .../jpa/dao/dstu3/FhirResourceDaoSearchParameterDstu3.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 446534ad694..880cd96e91e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -192,7 +192,7 @@ public abstract class BaseHapiFhirResourceDao extends B validateOkToDelete(deleteConflicts, entity); - preDelete(resourceToDelete); + preDelete(resourceToDelete, entity); // Notify interceptors if (theRequestDetails != null) { @@ -722,7 +722,8 @@ public abstract class BaseHapiFhirResourceDao extends B * Subclasses may override to provide behaviour. Invoked within a delete * transaction with the resource that is about to be deleted. */ - protected void preDelete(T theResourceToDelete) { + @SuppressWarnings("unused") + protected void preDelete(T theResourceToDelete, ResourceTable theEntityToDelete) { // nothing by default } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoSearchParameterDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoSearchParameterDstu3.java index 549be9ed979..5432daf5206 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoSearchParameterDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoSearchParameterDstu3.java @@ -98,8 +98,8 @@ public class FhirResourceDaoSearchParameterDstu3 extends FhirResourceDaoDstu3