com.isomorphic.util

## Class ErrorReport

- java.lang.Object
- - java.util.AbstractMap
  - - java.util.HashMap
    - - java.util.LinkedHashMap
      - - com.isomorphic.util.ErrorReport

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map

      public class ErrorReport
      extends java.util.LinkedHashMap

  Encapsulates a per-record set of validation errors.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ErrorReport()` Constructs an empty ErrorReport

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addError(java.lang.String fieldName, ErrorMessage error)` Add a validation error for a field.
    `void` | `addError(java.lang.String fieldName, java.lang.String message)` Convenience method - creates an ErrorMessage from the passed params and calls addError(fieldName, error).
    `void` | `addError(java.lang.String fieldName, java.lang.String message, java.lang.String suggestedValue)` Convenience method - creates an ErrorMessage from the passed params and calls addError(fieldName, error).
    `java.util.List` | `getErrors(java.lang.String fieldName)` Returns the list of validation errors (ErrorMessages) for a given field.

- - ### Constructor Detail

    - #### ErrorReport

          public ErrorReport()

      Constructs an empty ErrorReport

  - ### Method Detail

    - #### addError

          public void addError(java.lang.String fieldName,
                               java.lang.String message)

      Convenience method - creates an ErrorMessage from the passed params and calls addError(fieldName, error).
      Parameters:
        `fieldName` - fieldName for which to add the error
        `message` - set on created ErrorMessage

    - #### addError

          public void addError(java.lang.String fieldName,
                               java.lang.String message,
                               java.lang.String suggestedValue)

      Convenience method - creates an ErrorMessage from the passed params and calls addError(fieldName, error).
      Parameters:
        `fieldName` - fieldName for which to add the error
        `message` - set on created ErrorMessage
        `suggestedValue` - set on created ErrorMessage

    - #### addError

          public void addError(java.lang.String fieldName,
                               ErrorMessage error)

      Add a validation error for a field.
      Parameters:
        `fieldName` - fieldName for which to add the error
        `error` - the error

    - #### getErrors

          public java.util.List getErrors(java.lang.String fieldName)

      Returns the list of validation errors (ErrorMessages) for a given field.
      Parameters:
        `fieldName` - name of the field for which to return validation errors
      Returns:
        List of ErrorMessage objects, one for each error
      See Also:
        `ErrorMessage`