Class ObjectResolverConstraint

    • Method Detail

      • validate

        public boolean validate​(Object object)
        Description copied from interface: Constraint
        Validates the given object against this constraint.

        If some object is null. Constraint should return true while validating unless the constraint deals with nullable state.

        object - the object to validate
        true if the object was successfully validated, false otherwise
      • getDescription

        public Constraint.Description getDescription()
        Description copied from interface: Constraint
        Provides a description of a constraint. For example, a constraint which control String format could return name=PatternMatchingConstraint | parameters= "pattern":"[0-9]+"
        The constraint description.
      • getErrorMessage

        public String getErrorMessage​(Object invalidValue,
                                      Locale locale)
        Description copied from interface: Constraint
        Provides an error message to display when some invalid value does not match existing entity.
        Specified by:
        getErrorMessage in interface Constraint
        getErrorMessage in class AbstractConstraint
        invalidValue - The invalid value that don't match any entity.
        locale - The language in which the message should be generated.
        A message in the specified language or