org.apache.bval.jsr303
Interface CascadingPropertyValidator

All Superinterfaces:
Validator
All Known Implementing Classes:
ClassValidator, MethodValidatorImpl

public interface CascadingPropertyValidator
extends Validator

Per the bean validation spec, Valid is not honored by the Validator.validateProperty(Object, String, Class...) and Validator.validateValue(Class, String, Object, Class...) methods. The CascadingPropertyValidator interface thus defines a Validator that provides corresponding methods that may honor Valid. It should be noted that Validator.validateProperty(Object, String, Class...) and Validator.validateValue(Class, String, Object, Class...) are assumed semantically equivalent to calling the CascadingPropertyValidator-defined methods with cascade == false.

Version:
$Rev: 993539 $ $Date: 2010-09-07 16:27:50 -0500 (Tue, 07 Sep 2010) $

Method Summary
<T> Set<ConstraintViolation<T>>
validateProperty(T object, String propertyName, boolean cascade, Class<?>... groups)
          Validates all constraints placed on object's propertyName property, with optional validation cascading.
<T> Set<ConstraintViolation<T>>
validateValue(Class<T> beanType, String propertyName, Object value, boolean cascade, Class<?>... groups)
          Validates all constraints placed on object's propertyName property, with optional validation cascading, given a hypothetical property value.
 
Methods inherited from interface javax.validation.Validator
getConstraintsForClass, unwrap, validate, validateProperty, validateValue
 

Method Detail

validateProperty

<T> Set<ConstraintViolation<T>> validateProperty(T object,
                                                 String propertyName,
                                                 boolean cascade,
                                                 Class<?>... groups)
Validates all constraints placed on object's propertyName property, with optional validation cascading.

Type Parameters:
T -
Parameters:
object -
propertyName -
cascade -
groups -
Returns:
the resulting Set of ConstraintViolations.

validateValue

<T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType,
                                              String propertyName,
                                              Object value,
                                              boolean cascade,
                                              Class<?>... groups)
Validates all constraints placed on object's propertyName property, with optional validation cascading, given a hypothetical property value.

Type Parameters:
T -
Parameters:
beanType -
propertyName -
value -
cascade -
groups -
Returns:
the resulting Set of ConstraintViolations.


Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.