Package org.springframework.rules.constraint

Examples of org.springframework.rules.constraint.CompoundConstraint


        super(propertyName);
        Assert.notNull(otherPropertyNames, "otherPropertyNames is required");
        Assert.notNull(operator, "operator is required");
        Assert.notEmpty(otherPropertyNames, "otherPropertyNames must consist of at least one name");

        CompoundConstraint compoundConstraint = operator.createConstraint();
        CompoundPropertyConstraint propertyConstraint = new CompoundPropertyConstraint(compoundConstraint);
        for( int i = 0; i < otherPropertyNames.length; i++ ) {
            propertyConstraint.add(new PropertyPresent(otherPropertyNames[i]));
        }
        setConstraint(propertyConstraint);
View Full Code Here


  public void testNestedValidationResultsPropertyConstraint() {
    Person p = new Person();

    Rules rules = new Rules(Person.class);
    CompoundConstraint constraint =
        constraints.or(
            constraints.all(
                "firstName",
                new Constraint[]{
                  constraints.required(),
View Full Code Here

TOP

Related Classes of org.springframework.rules.constraint.CompoundConstraint

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.