Package org.internna.iwebmvc.core.validation.annotation

Examples of org.internna.iwebmvc.core.validation.annotation.BeanConstraint


        return errors;
    }

    protected Set<ValidationError> validateBeanConstraint(final Field field, final Object bean) {
        Set<ValidationError> errors = new HashSet<ValidationError>();
        BeanConstraint beanConstraint = field.getAnnotation(BeanConstraint.class);
        if (beanConstraint != null) {
            if (beanConstraint.required() & (bean == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], beanConstraint, bean));
            if ((bean != null) && (beanConstraint.traverse())) {
                Collection<ValidationError> deepErrors = this.visit(bean);
                for (ValidationError error : deepErrors) error.addPath(field.getName());
                errors.addAll(deepErrors);
            }
        }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.core.validation.annotation.BeanConstraint

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.