code: protected static void validateAudit(AuditRecord audit)
              throws ObjectIntegrityException {
          if (audit.id == null || audit.id.isEmpty()) {
              throw new ObjectIntegrityException("Audit record must have id.");
          }
          if (audit.date == null) {
              throw new ObjectIntegrityException("Audit record must have date.");
          }
          if (audit.processType == null || audit.processType.isEmpty()) {
              throw new ObjectIntegrityException("Audit record must have processType.");
          }
          if (audit.action == null || audit.action.isEmpty()) {
              throw new ObjectIntegrityException("Audit record must have action.");
          }
          if (audit.componentID == null) {
              audit.componentID = ""; // for backwards compatibility, no error on null
              // throw new ObjectIntegrityException("Audit record must have componentID.");
          }
          if (audit.responsibility == null || audit.responsibility.isEmpty()) {
              throw new ObjectIntegrityException("Audit record must have responsibility.");
          }
      }
docs: The audit record is created by the system, so programmatic validation
  here is o.k. Normally, validation takes place via XML Schema and
  Schematron.
  
  @param audit
  @throws ObjectIntegrityException