|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.validator.ClassValidator<T>
public class ClassValidator<T>
Engine that take a bean and check every expressed annotation restrictions
Constructor Summary | |
---|---|
ClassValidator(Class<T> beanClass)
create the validator engine for this bean type |
|
ClassValidator(Class<T> beanClass,
MessageInterpolator interpolator)
create the validator engine for a particular bean class, using a custom message interpolator for message rendering on violation |
|
ClassValidator(Class<T> beanClass,
ResourceBundle resourceBundle)
create the validator engine for a particular bean class, using a resource bundle for message rendering on violation |
|
ClassValidator(Class<T> beanClass,
ResourceBundle resourceBundle,
MessageInterpolator interpolator,
Map<org.hibernate.annotations.common.reflection.XClass,ClassValidator> childClassValidators,
org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager)
Not a public API |
Method Summary | |
---|---|
void |
apply(org.hibernate.mapping.PersistentClass persistentClass)
apply the registred constraints rules on the hibernate metadata (to be applied on DB schema...) |
void |
assertValid(T bean)
|
static org.hibernate.mapping.Property |
findPropertyByName(org.hibernate.mapping.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 |
InvalidValue[] |
getInvalidValues(T bean)
apply constraints on a bean instance and return all the failures. |
InvalidValue[] |
getInvalidValues(T bean,
String propertyName)
Apply constraints of a particular property on a bean instance and return all the failures. |
InvalidValue[] |
getPotentialInvalidValues(String propertyName,
Object value)
Apply constraints of a particular property value of a bean type and return all the failures. |
boolean |
hasValidationRules()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassValidator(Class<T> beanClass)
public ClassValidator(Class<T> beanClass, ResourceBundle resourceBundle)
public ClassValidator(Class<T> beanClass, MessageInterpolator interpolator)
public ClassValidator(Class<T> beanClass, ResourceBundle resourceBundle, MessageInterpolator interpolator, Map<org.hibernate.annotations.common.reflection.XClass,ClassValidator> childClassValidators, org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager)
Method Detail |
---|
public boolean hasValidationRules()
public InvalidValue[] getInvalidValues(T bean)
bean
is null, an empty array is returned
public InvalidValue[] getInvalidValues(T bean, String propertyName)
public InvalidValue[] getPotentialInvalidValues(String propertyName, Object value)
public void apply(org.hibernate.mapping.PersistentClass persistentClass)
persistentClass
- hibernate metadatapublic void assertValid(T bean)
public static org.hibernate.mapping.Property findPropertyByName(org.hibernate.mapping.PersistentClass associatedClass, String propertyName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |