Examples of ParameterizedPropertyConstraint


Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

    public PropertyConstraint not(PropertyConstraint e) {
        return new NegatedPropertyConstraint(e);
    }

    public PropertyConstraint valueProperty(String propertyName, BinaryConstraint constraint, Object value) {
        return new ParameterizedPropertyConstraint(propertyName, constraint, value);
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

     * @param propertyName The first property
     * @param propertyValue The constraint value
     * @return The constraint
     */
    public PropertyConstraint eq(String propertyName, Object propertyValue) {
        return new ParameterizedPropertyConstraint(propertyName, eq(propertyValue));
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

     * @return The constraint
     *
     * @since 0.3.0
     */
    public PropertyConstraint eq(String propertyName, Object propertyValue, Comparator comparator) {
        return new ParameterizedPropertyConstraint(propertyName, eq(propertyValue, comparator));
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

     * @param propertyName The first property
     * @param propertyValue The constraint value
     * @return The constraint
     */
    public PropertyConstraint gt(String propertyName, Comparable propertyValue) {
        return new ParameterizedPropertyConstraint(propertyName, gt(propertyValue));
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

     * @param propertyName The first property
     * @param propertyValue The constraint value
     * @return The constraint
     */
    public PropertyConstraint gte(String propertyName, Comparable propertyValue) {
        return new ParameterizedPropertyConstraint(propertyName, gte(propertyValue));
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

     * @param propertyName The first property
     * @param propertyValue The constraint value
     * @return The constraint
     */
    public PropertyConstraint lt(String propertyName, Comparable propertyValue) {
        return new ParameterizedPropertyConstraint(propertyName, lt(propertyValue));
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

     * @param propertyName The first property
     * @param propertyValue The constraint value
     * @return The constraint
     */
    public PropertyConstraint lte(String propertyName, Comparable propertyValue) {
        return new ParameterizedPropertyConstraint(propertyName, lte(propertyValue));
    }
View Full Code Here

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint

    p = new PropertiesConstraint("test", EqualTo.instance(), "min");
    assertFalse(p.test(new TestBean()));
  }

  public void testParameterizedBeanPropertyExpression() {
    ParameterizedPropertyConstraint p = new ParameterizedPropertyConstraint("test", EqualTo.instance(), "testValue");
    assertTrue(p.test(new TestBean()));

    p = new ParameterizedPropertyConstraint("test", EqualTo.instance(), "test2Value");
    assertFalse(p.test(new TestBean()));
  }
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.