Examples of ConstraintDefinitionException


Examples of javax.validation.ConstraintDefinitionException

                annotatedElt++;
            }
        }

        if (annotatedElt == 0 && param >= 1 && constraintValidation.getValidationAppliesTo() != null) { // pure cross param
            throw new ConstraintDefinitionException("pure cross parameter constraints shouldn't get validationAppliesTo attribute");
        } else {
            if (param >= 1 && annotatedElt >= 1 && constraintValidation.getValidationAppliesTo() == null) { // generic and cross param
                throw new ConstraintDefinitionException("cross parameter AND generic constraints should get validationAppliesTo attribute");
            } else if (param == 0 && constraintValidation.getValidationAppliesTo() != null) { // pure generic
                throw new ConstraintDefinitionException("pure generic constraints shouldn't get validationAppliesTo attribute");
            }
        }

        return new Pair(annotatedElt, param);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.