use of org.hibernate.envers.internal.synchronization.work.DelWorkUnit in project hibernate-orm by hibernate.
the class EnversPostDeleteEventListenerImpl method onPostDelete.
@Override
public void onPostDelete(PostDeleteEvent event) {
final String entityName = event.getPersister().getEntityName();
if (getEnversService().getEntitiesConfigurations().isVersioned(entityName)) {
checkIfTransactionInProgress(event.getSession());
final AuditProcess auditProcess = getEnversService().getAuditProcessManager().get(event.getSession());
final AuditWorkUnit workUnit = new DelWorkUnit(event.getSession(), event.getPersister().getEntityName(), getEnversService(), event.getId(), event.getPersister(), event.getDeletedState());
auditProcess.addWorkUnit(workUnit);
if (workUnit.containsWork()) {
generateBidirectionalCollectionChangeWorkUnits(auditProcess, event.getPersister(), entityName, null, event.getDeletedState(), event.getSession());
}
}
}
Aggregations