Package org.hibernate.validator

Examples of org.hibernate.validator.ValidatorClass


     *
     * @see PropertyValidationAnnotationHandler#supports(java.lang.annotation.Annotation, Class, java.beans.PropertyDescriptor)
     */
    public boolean supports(Annotation annotation, Class clazz, PropertyDescriptor descriptor) {
        Class annotationClass = annotation.annotationType();
        ValidatorClass validatorClassAnnotation = (ValidatorClass) annotationClass.getAnnotation(ValidatorClass.class);
        if (validatorClassAnnotation != null) {
            return true;
        }

        if (annotation instanceof Valid) {
View Full Code Here


            configuration.addCascadeValidation(new CascadeValidation(descriptor.getName()));
            return;
        }

        Class annotationClass = annotation.annotationType();
        ValidatorClass validatorClassAnnotation = (ValidatorClass) annotationClass.getAnnotation(ValidatorClass.class);
        Class<? extends Validator> validatorClass = validatorClassAnnotation.value();
        Validator validator = (Validator) BeanUtils.instantiateClass(validatorClass);
        validator.initialize(annotation);
        Condition condition = Conditions.property(descriptor.getName(), new HibernateValidatorCondition(validator));
        String message;
        try {
View Full Code Here

     *
     * @see PropertyValidationAnnotationHandler#supports(java.lang.annotation.Annotation, Class, java.beans.PropertyDescriptor)
     */
    public boolean supports(Annotation annotation, Class clazz, PropertyDescriptor descriptor) {
        Class annotationClass = annotation.annotationType();
        ValidatorClass validatorClassAnnotation = (ValidatorClass)annotationClass.getAnnotation(ValidatorClass.class);
        if (validatorClassAnnotation != null) {
            return true;
        }

        if (annotation instanceof Valid) {
View Full Code Here

            configuration.addCascadeValidation(new CascadeValidation(descriptor.getName()));
            return;
        }

        Class annotationClass = annotation.annotationType();
        ValidatorClass validatorClassAnnotation = (ValidatorClass)annotationClass.getAnnotation(ValidatorClass.class);
        Class<? extends Validator> validatorClass = validatorClassAnnotation.value();
        Validator validator = (Validator) BeanUtils.instantiateClass(validatorClass);
        validator.initialize(annotation);
        Condition condition = Conditions.property(descriptor.getName(), new HibernateValidatorCondition(validator));
        String message;
        try {
View Full Code Here

TOP

Related Classes of org.hibernate.validator.ValidatorClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.