@PreUpdate
  public void beforeUpdate(Object entity) {
    if (entity instanceof AbstractAuditableEntity) {
      AbstractAuditableEntity o = (AbstractAuditableEntity) entity;
      o.setUpdatedAt(OffsetDateTime.now());

      if (o.getUpdatedBy() == null) {
        o.setUpdatedBy(currentUser());
      }
    }
  }
  //    @Inject
  //    @AuthenticatedUser
  //    User user;
  //    @PersistenceContext
  //    EntityManager em;
  @PrePersist
  public void beforePersist(Object entity) {
    if (entity instanceof AbstractAuditableEntity) {
      AbstractAuditableEntity o = (AbstractAuditableEntity) entity;
      final OffsetDateTime now = OffsetDateTime.now();
      o.setCreatedAt(now);
      o.setUpdatedAt(now);

      if (o.getCreatedBy() == null) {
        o.setCreatedBy(currentUser());
      }
    }
  }