Package grails.validation

Examples of grails.validation.ConstraintsEvaluator.evaluate()


    private void initializeConstraints() {
        // process the constraints
        final ConstraintsEvaluator constraintsEvaluator = getConstraintsEvaluator();
        if(constraintsEvaluator != null) {
            constraints = constraintsEvaluator.evaluate(getClazz(), persistentProperties);
        }
        else {
            constraints = Collections.emptyMap();
        }
    }
View Full Code Here


    public void refreshConstraints() {
        final ConstraintsEvaluator constraintEvaluator = getConstraintsEvaluator();
        if (defaultConstraints!=null) {

            constraints = constraintEvaluator.evaluate(getClazz(), persistentProperties);
        }
        else {
            constraints = constraintEvaluator.evaluate(getClazz(), persistentProperties);
        }
View Full Code Here

    }

    private static Map<String, Constrained> getConstraintMap(GrailsDomainClassProperty[] properties, Map<String, Object> defaultConstraints, Class<?> theClass) {
        ConstraintsEvaluator constraintsEvaluator = GrailsFactoriesLoader.loadFactory(ConstraintsEvaluator.class, defaultConstraints);
        if(constraintsEvaluator != null) {
            return constraintsEvaluator.evaluate(theClass, properties);
        }
        return Collections.emptyMap();
    }

    /**
 
View Full Code Here

        if (defaultConstraints!=null) {

            constraints = constraintEvaluator.evaluate(getClazz(), persistentProperties);
        }
        else {
            constraints = constraintEvaluator.evaluate(getClazz(), persistentProperties);
        }

        // Embedded components have their own ComponentDomainClass instance which
        // won't be refreshed by the application. So, we have to do it here.
        for (GrailsDomainClassProperty property : persistentProperties) {
View Full Code Here

            if (tmp != null) transients = tmp;
            properties = createDomainClassProperties(descriptors);

            ConstraintsEvaluator constraintsEvaluator = getConstraintsEvaluator();
            if(constraintsEvaluator != null) {
                constraints = constraintsEvaluator.evaluate(type, properties);
            }
            else {
                constraints = Collections.emptyMap();
            }
        }
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.