org.springframework.rules.constraint.property
Class PropertyValueConstraint

java.lang.Object
  extended by org.springframework.rules.constraint.property.AbstractPropertyConstraint
      extended by org.springframework.rules.constraint.property.PropertyValueConstraint
All Implemented Interfaces:
Constraint, PropertyConstraint

public class PropertyValueConstraint
extends AbstractPropertyConstraint
implements Constraint

A constraint that returns the result of a boolean expression that tests a variable bean property value against a predicate (constraint). For example: pet.age is required

Author:
Keith Donald

Constructor Summary
PropertyValueConstraint(String propertyName, Constraint valueConstraint)
          Creates a BeanPropertyValueConstraint.
 
Method Summary
 Constraint getConstraint()
           
protected  boolean test(PropertyAccessStrategy domainObjectAccessStrategy)
           
 String toString()
           
 
Methods inherited from class org.springframework.rules.constraint.property.AbstractPropertyConstraint
getPropertyName, isCompoundRule, isDependentOn, setPropertyName, test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.core.closure.Constraint
test
 

Constructor Detail

PropertyValueConstraint

public PropertyValueConstraint(String propertyName,
                               Constraint valueConstraint)
Creates a BeanPropertyValueConstraint.

Parameters:
propertyName - The constrained property.
valueConstraint - The property value constraint (tester).
Method Detail

test

protected boolean test(PropertyAccessStrategy domainObjectAccessStrategy)
Specified by:
test in class AbstractPropertyConstraint

getConstraint

public Constraint getConstraint()

toString

public String toString()
Overrides:
toString in class AbstractPropertyConstraint


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.