Save This Page
Home » hibernate-validator-src-20081106 » org.hibernate » validator » [javadoc | source]
org.hibernate.validator
public class: ClassValidator [javadoc | source]
java.lang.Object
   org.hibernate.validator.ClassValidator

All Implemented Interfaces:
    Serializable

Engine that take a bean and check every expressed annotation restrictions
Constructor:
 public ClassValidator(Class beanClass) 
    create the validator engine for this bean type
 public ClassValidator(Class beanClass,
    ResourceBundle resourceBundle) 
    create the validator engine for a particular bean class, using a resource bundle for message rendering on violation
 public ClassValidator(Class beanClass,
    MessageInterpolator interpolator) 
    create the validator engine for a particular bean class, using a custom message interpolator for message rendering on violation
 public ClassValidator(Class beanClass,
    ResourceBundle resourceBundle,
    MessageInterpolator interpolator,
    Map childClassValidators,
    ReflectionManager reflectionManager) 
    Not a public API
 protected ClassValidator(XClass beanXClass,
    ResourceBundle resourceBundle,
    MessageInterpolator userInterpolator,
    Map childClassValidators,
    ReflectionManager reflectionManager) 
Method from org.hibernate.validator.ClassValidator Summary:
apply,   assertValid,   findPropertyByName,   getInvalidValues,   getInvalidValues,   getInvalidValues,   getPotentialInvalidValues,   hasValidationRules
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.validator.ClassValidator Detail:
 public  void apply(PersistentClass persistentClass) 
    apply the registred constraints rules on the hibernate metadata (to be applied on DB schema...)
 public  void assertValid(T bean) 
 public static Property findPropertyByName(PersistentClass associatedClass,
    String propertyName) 
    Retrieve the property by path in a recursive way, including IndetifierProperty in the loop If propertyName is null or empty, the IdentifierProperty is returned
 public InvalidValue[] getInvalidValues(T bean) 
    apply constraints on a bean instance and return all the failures. if bean is null, an empty array is returned
 protected InvalidValue[] getInvalidValues(T bean,
    Set circularityState) 
    apply constraints on a bean instance and return all the failures. if bean is null, an empty array is returned
 public InvalidValue[] getInvalidValues(T bean,
    String propertyName) 
    Apply constraints of a particular property on a bean instance and return all the failures. Note this is not recursive.
 public InvalidValue[] getPotentialInvalidValues(String propertyName,
    Object value) 
    Apply constraints of a particular property value of a bean type and return all the failures. The InvalidValue objects returns return null for InvalidValue#getBean() and InvalidValue#getRootBean() Note this is not recursive.
 public boolean hasValidationRules()