Examples of FieldValidator


Examples of org.exolab.castor.xml.FieldValidator

        Object tempObject;
        //3--The descriptor is multivalued
        if (fieldDesc.isMultivalued()) {
            //-- check size
            FieldValidator validator = fieldDesc.getValidator();
            if (validator != null) {
                if (validator.getMaxOccurs() < 0) {
                   result = true;
                }
                 else {
                    // count current objects and add 1
                    tempObject = fieldDesc.getHandler().getValue(object);
                    int current = Array.getLength(tempObject);
                    int newTotal = current + 1;
                    result = (newTotal <= validator.getMaxOccurs());
                 }
            }
            else {
                //-- not created by source generator...assume unbounded
                result = true;
View Full Code Here

Examples of org.openengsb.core.api.validation.FieldValidator

        assertBuildException("password");
    }

    @Test
    public void testBuildWithValidator_shouldReturnSameValidator() throws Exception {
        @SuppressWarnings("serial")
        FieldValidator fieldValidator = new FieldValidator() {
            @Override
            public SingleAttributeValidationResult validate(String validate) {
                return null;
            }
        };
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.