Class JCATraversableResolver

  • All Implemented Interfaces:
    jakarta.validation.TraversableResolver

    public class JCATraversableResolver
    extends Object
    implements jakarta.validation.TraversableResolver
    JCATraversableResolver
    Version:
    $Revision: $
    Author:
    Jeff Zhang
    • Constructor Detail

      • JCATraversableResolver

        public JCATraversableResolver()
    • Method Detail

      • isReachable

        public boolean isReachable​(Object traversableObject,
                                   jakarta.validation.Path.Node traversableProperty,
                                   Class<?> rootBeanType,
                                   jakarta.validation.Path pathToTraversableObject,
                                   ElementType elementType)
        Determine if Bean Validation is allowed to reach the property state
        Specified by:
        isReachable in interface jakarta.validation.TraversableResolver
        Parameters:
        traversableObject - object hosting traversableProperty or null if validateValue is called
        traversableProperty - the traversable property.
        rootBeanType - type of the root object passed to the Validator.
        pathToTraversableObject - path from the root object to traversableObject (using the path specification defined by Bean Validator).
        elementType - either FIELD or METHOD.
        Returns:
        true if Bean Validation is allowed to reach the property state, false otherwise.
      • isCascadable

        public boolean isCascadable​(Object traversableObject,
                                    jakarta.validation.Path.Node traversableProperty,
                                    Class<?> rootBeanType,
                                    jakarta.validation.Path pathToTraversableObject,
                                    ElementType elementType)
        Determine if Bean Validation is allowed to cascade validation on the bean instance returned by the property value marked as @Valid. Note that this method is called only if isReachable returns true for the same set of arguments and if the property is marked as @Valid
        Specified by:
        isCascadable in interface jakarta.validation.TraversableResolver
        Parameters:
        traversableObject - object hosting traversableProperty or null if validateValue is called
        traversableProperty - the traversable property.
        rootBeanType - type of the root object passed to the Validator.
        pathToTraversableObject - path from the root object to traversableObject (using the path specification defined by Bean Validator).
        elementType - either FIELD or METHOD.
        Returns:
        true if Bean Validation is allowed to cascade validation, false otherwise.