use of org.hisp.dhis.common.SoftDeletableObject in project dhis2-core by dhis2.
the class JdbcMaintenanceStore method auditHardDeletedEntity.
private void auditHardDeletedEntity(List<String> deletedEntities, Class<? extends SoftDeletableObject> entity) {
deletedEntities.forEach(deletedEntity -> {
SoftDeletableObject object = ENTITY_MAPPER.getOrDefault(entity, new SoftDeletableObject());
object.setUid(deletedEntity);
object.setDeleted(true);
auditManager.send(Audit.builder().auditType(AuditType.DELETE).auditScope(AuditScope.TRACKER).createdAt(LocalDateTime.now()).object(object).uid(deletedEntity).auditableEntity(new AuditableEntity(entity, object)).build());
});
}
Aggregations