Save This Page
Home » hibernate-validator-src-20081106 » javax.validation » [javadoc | source]
javax.validation
public interface: Validator [javadoc | source]

All Implemented Interfaces:
    Serializable

Validate a given object type. Implementations of this interface must be thread-safe
Method from javax.validation.Validator Summary:
getConstraintsForClass,   getConstraintsForProperty,   getPropertiesWithConstraints,   hasConstraints,   validate,   validateProperty,   validateValue
Method from javax.validation.Validator Detail:
 public BeanDescriptor getConstraintsForClass()
    Return the class level constraints The returned object (and associated objects including ConstraintDescriptors) are immutable.
 public PropertyDescriptor getConstraintsForProperty(String propertyName)
    Return the property level constraints for a given propertyName or null if either the property does not exist or has no constraint The returned object (and associated objects including ConstraintDescriptors) are immutable.
 public Set getPropertiesWithConstraints()
    return the property names having at least a constraint defined
 public boolean hasConstraints()
    return true if at least one constraint declaration is present for the given bean or if one property is marked for validation cascade
 public Set validate(T object,
    String groups)
    validate all constraints on object
 public Set validateProperty(T object,
    String propertyName,
    String groups)
    validate all constraints on <code>propertyName</code> property of object
 public Set validateValue(String propertyName,
    Object value,
    String groups)
    validate all constraints on propertyName property if the property value is value

    TODO express limitations of ConstraintViolation in this case