org.springframework.rules.constraint.property
Class PropertyValueConstraint
java.lang.Object
org.springframework.rules.constraint.property.AbstractPropertyConstraint
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
Methods inherited from interface org.springframework.core.closure.Constraint |
test |
PropertyValueConstraint
public PropertyValueConstraint(String propertyName,
Constraint valueConstraint)
- Creates a BeanPropertyValueConstraint.
- Parameters:
propertyName
- The constrained property.valueConstraint
- The property value constraint (tester).
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.