test_class.file: framework/persistence/src/test/java/org/koenighotze/jee7hotel/framework/persistence/audit/AuditTest.java
test_class.identifier: AuditTest
test_case.body: @Test
      public void the_audit_continues_silently_if_the_fields_are_missing() {
          new Audit().setAuditFields(""); // no exceptions...only silence
      }
test_case.class_method_signature: AuditTest.the_audit_continues_silently_if_the_fields_are_missing()
test_case.full_signature: @Test public void the_audit_continues_silently_if_the_fields_are_missing()
test_case.identifier: the_audit_continues_silently_if_the_fields_are_missing
test_case.invocations: setAuditFields
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void the_audit_continues_silently_if_the_fields_are_missing()
focal_class.declarator: LOGGER = Logger.getLogger(Audit.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(Audit.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: framework/persistence/src/main/java/org/koenighotze/jee7hotel/framework/persistence/audit/Audit.java
focal_class.identifier: Audit
focal_class.class_method_signature: Audit.setAuditFields(Object entity)
focal_class.full_signature: @PreUpdate @PrePersist public void setAuditFields(Object entity)
focal_class.identifier: setAuditFields
focal_class.modifiers: @PreUpdate @PrePersist public
focal_class.parameters: (Object entity)
focal_class.return: void
focal_class.signature: void setAuditFields(Object entity)
focal_method.body: @PreUpdate
      @PrePersist
      public void setAuditFields(Object entity) {
          final LocalDateTime NOW = now();
  
          for (Field field : entity.getClass().getDeclaredFields()) {
              if (field.getAnnotation(Auditable.class) != null && field.getType().equals(Date.class)) {
                  try {
                      LOGGER.finest(() -> format("Setting %s field %s to %s", entity.getClass(), field.getName(), NOW));
                      field.setAccessible(true);
                      field.set(entity, java.sql.Timestamp.valueOf(NOW));
                  } catch (IllegalAccessException e) {
                      throw new RuntimeException(e);
                  }
              }
          }
      }
focal_method.class_method_signature: Audit.setAuditFields(Object entity)
focal_method.full_signature: @PreUpdate @PrePersist public void setAuditFields(Object entity)
focal_method.identifier: setAuditFields
focal_method.invocations: now getDeclaredFields getClass getAnnotation equals getType finest format getClass getName setAccessible set valueOf
focal_method.modifiers: @PreUpdate @PrePersist public
focal_method.parameters: (Object entity)
focal_method.return: void
focal_method.signature: void setAuditFields(Object entity)