Package org.springmodules.validation.bean.rule

Examples of org.springmodules.validation.bean.rule.NotNullValidationRule


    protected boolean isNullSupported() {
        return true;
    }

    protected AbstractValidationRule createValidationRule(Element element) {
        return new NotNullValidationRule();
    }
View Full Code Here


        // handling nullability only if more explicit validation annotations do not exit.
        if (!contains(annotations, NotNull.class) &&
            (!LibraryUtils.HIBERNATE_VALIDATOR_IN_CLASSPATH || !contains(annotations, org.hibernate.validator.NotNull.class))) {
            if (!oneToOne.optional()) {
                PropertyValidationRule propertyRule = new PropertyValidationRule(descriptor.getName(), new NotNullValidationRule());
                configuration.addPropertyRule(descriptor.getName(), propertyRule);
            }
        }

    }
View Full Code Here

        // handling nullability only if more explicit validation annotations do not exit.
        if (!contains(annotations, NotNull.class) &&
            (!LibraryUtils.HIBERNATE_VALIDATOR_IN_CLASSPATH || !contains(annotations, org.hibernate.validator.NotNull.class))) {
            if (!basic.optional()) {
                PropertyValidationRule propertyRule = new PropertyValidationRule(descriptor.getName(), new NotNullValidationRule());
                configuration.addPropertyRule(descriptor.getName(), propertyRule);
            }
        }

    }
View Full Code Here

        // handling nullability only if other explicit validation annotations do not exist.
        if (!contains(annotations, NotNull.class) &&
            (!LibraryUtils.HIBERNATE_VALIDATOR_IN_CLASSPATH || !contains(annotations, org.hibernate.validator.NotNull.class))) {
            if (!column.nullable()) {
                PropertyValidationRule propertyRule = new PropertyValidationRule(descriptor.getName(), new NotNullValidationRule());
                configuration.addPropertyRule(descriptor.getName(), propertyRule);
            }
        }

    }
View Full Code Here

        // handling nullability only if more explicit validation annotations do not exit.
        if (!contains(annotations, NotNull.class) &&
            (!LibraryUtils.HIBERNATE_VALIDATOR_IN_CLASSPATH || !contains(annotations, org.hibernate.validator.NotNull.class))) {
            if (!manyToOne.optional()) {
                PropertyValidationRule propertyRule = new PropertyValidationRule(descriptor.getName(), new NotNullValidationRule());
                configuration.addPropertyRule(descriptor.getName(), propertyRule);
            }
        }

    }
View Full Code Here

    public NotNullValidationAnnotationHandler() {
        super(NotNull.class);
    }

    protected AbstractValidationRule createValidationRule(Annotation annotation, Class clazz, String propertyName) {
        return new NotNullValidationRule();
    }
View Full Code Here

    protected boolean isNullSupported() {
        return true;
    }

    protected AbstractValidationRule createValidationRule(Element element) {
        return new NotNullValidationRule();
    }
View Full Code Here

TOP

Related Classes of org.springmodules.validation.bean.rule.NotNullValidationRule

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.