Merge branch 'improve_jpa_indexes' of github.com:jamesagnew/hapi-fhir into improve_jpa_indexes

This commit is contained in:
James Agnew 2018-06-26 21:54:32 -04:00
commit 74bca0562e
1 changed files with 13 additions and 0 deletions

View File

@ -1482,6 +1482,15 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
// nothing
}
/**
* Subclasses may override to provide behaviour. Called when a pre-existing resource has been updated in the database
*
* @param theEntity The resource
*/
protected void postDelete(ResourceTable theEntity) {
// nothing
}
/**
* Subclasses may override to provide behaviour. Called when a pre-existing resource has been updated in the database
*
@ -2027,6 +2036,10 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao,
postPersist(theEntity, (T) theResource);
} else if (theEntity.getDeleted() != null) {
postDelete(theEntity);
} else {
theEntity = myEntityManager.merge(theEntity);