Examples of fraction()


Examples of javax.validation.constraints.DecimalMax.fraction()

            DecimalMaxFacet facet = new DecimalMaxFacet(a.value(), a.inclusive());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Digits.class)) {
            Digits a = (Digits) helper.getAnnotation(element, Digits.class);
            DigitsFacet facet = new DigitsFacet(a.integer(), a.fraction());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Max.class)) {
            Max a = (Max) helper.getAnnotation(element, Max.class);
            MaxFacet facet = new MaxFacet(a.value());
View Full Code Here

Examples of javax.validation.constraints.DecimalMin.fraction()

            DecimalMaxFacet facet = new DecimalMaxFacet(a.value(), a.inclusive());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Digits.class)) {
            Digits a = (Digits) helper.getAnnotation(element, Digits.class);
            DigitsFacet facet = new DigitsFacet(a.integer(), a.fraction());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Max.class)) {
            Max a = (Max) helper.getAnnotation(element, Max.class);
            MaxFacet facet = new MaxFacet(a.value());
View Full Code Here

Examples of javax.validation.constraints.Digits.fraction()

        } else if (annotation instanceof Digits) {
            // The annotated element must be a number within accepted range Supported types are: BigDecimal BigInteger
            // String byte, short, int, long, and their respective wrapper types
            // null elements are considered valid
            Digits digits = (Digits) annotation;
            if (digits.fraction() == 0) {
                sb.append("digits: true, \n");
                sb.append("maxlength: ").append(digits.integer());
            } else {
                // Something like /^\d{1,5}(\.\d{1,2})?$/
                sb.append("pattern: /^\\d{1,").append(digits.integer()).append("}(\\.\\d{1,").append(digits.fraction()).append("})?$/ ");
View Full Code Here

Examples of javax.validation.constraints.Digits.fraction()

            if (digits.fraction() == 0) {
                sb.append("digits: true, \n");
                sb.append("maxlength: ").append(digits.integer());
            } else {
                // Something like /^\d{1,5}(\.\d{1,2})?$/
                sb.append("pattern: /^\\d{1,").append(digits.integer()).append("}(\\.\\d{1,").append(digits.fraction()).append("})?$/ ");
            }
        } else if (annotation instanceof Digits.List) {
            // Defines several @Digits annotations on the same element
            throw new UnsupportedOperationException("Not implemented");
        } else if (annotation instanceof Future) {
View Full Code Here

Examples of javax.validation.constraints.Digits.fraction()

            DecimalMaxFacet facet = new DecimalMaxFacet(a.value(), a.inclusive());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Digits.class)) {
            Digits a = (Digits) helper.getAnnotation(element, Digits.class);
            DigitsFacet facet = new DigitsFacet(a.integer(), a.fraction());
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Max.class)) {
            Max a = (Max) helper.getAnnotation(element, Max.class);
            MaxFacet facet = new MaxFacet(a.value());
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.