Class DataValidationInfo

java.lang.Object
com.mendix.core.objectmanagement.DataValidationInfo

public class DataValidationInfo extends Object
Contains failed validation information.
  • Constructor Details

    • DataValidationInfo

      public DataValidationInfo(Long guid)
      Creates a failed validation with the specified identifier.
      Parameters:
      guid - the id of the object which contains the validated attributes
  • Method Details

    • guid

      public Long guid()
      The id of the object which contain the validated attributes.
      Returns:
      id of the object which contain the validated attributes
    • errorFields

      public HashMap<String,String> errorFields()
      A map from attribute name to the failed validation message.
      Returns:
      map from attribute name to the failed validation message
    • addErrorField

      public void addErrorField(String memberName, String message)
      Add a failed validation message for an attribute.

      If there was a previous value for an attribute it will be overwritten.

      Parameters:
      memberName - the attribute on which the failed validation was found
      message - the validation failure message
    • addErrorField

      public void addErrorField(String memberName, String message, List<IDataValidation> validations)
      Add a failed validation message and list of failed validations for an attribute.

      If there was a previous value for an attribute it will be overwritten.

      Parameters:
      memberName - the attribute on which the failed validation was found
      message - the validation failure message
      validations - the failed validations to add
    • addErrorField

      public void addErrorField(String memberName, List<IDataValidation> validations)
      Add a list of failed validations for an attribute.

      If there was a previous value for an attribute it will be overwritten.

      Parameters:
      memberName - the attribute on which the failed validation was found
      validations - the failed validations to add
    • failedValidations

      public HashMap<String,List<IDataValidation>> failedValidations()
      List of failed validations.
      Returns:
      list of failed validations
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object