@PreUpdate public void setAuditDataOnUpdate(Object object) { if (object instanceof Auditable) { Auditable auditable = (Auditable) object; auditable.setLastUpdateDate(new Date()); } }
@PrePersist public void setAuditDataOnPersist(Object object) { if (object instanceof Auditable) { Auditable auditable = (Auditable) object; auditable.setCreationDate(new Date()); } }