Class ValidationResult

All Implemented Interfaces:
DataExceptionContributor, JsonSerializable, RecordSerializable, XmlSerializable, JavaCodeGenerator, Serializable, Cloneable

public class ValidationResult extends SchemaObject implements Cloneable
Collects the ValidationMessage errors produced when mapping or validating data against a schema definition.
See Also:
  • Constructor Details

    • ValidationResult

      public ValidationResult()
  • Method Details

    • clone

      public ValidationResult clone()
      Overrides:
      clone in class FoundationObject
    • isValid

      public boolean isValid()
    • isNotValid

      public boolean isNotValid()
    • getErrors

      public List<ValidationMessage> getErrors()
      Returns the errors or null if none were added.
    • getErrors

      public List<ValidationMessage> getErrors(boolean create)
      Returns the errors, creating the list if it is null and create is true.
    • setErrors

      public ValidationResult setErrors(List<ValidationMessage> errors)
    • getMessages

      public List<String> getMessages()
      Returns the message of each error in order (empty if there are none).
    • getFields

      public List<FieldDef> getFields()
      Returns the field of each error in order, with null for errors not tied to a field.
    • getFieldNames

      public List<String> getFieldNames()
      Returns the field name of each error in order, with null for errors not tied to a field.
    • getFieldNamesForErrorMessage

      public List<String> getFieldNamesForErrorMessage()
      Returns FieldDef.getNameForErrorMessage() for the field of each error in order, with null for errors not tied to a field.
    • clear

      public ValidationResult clear()