org.springframework.rules.factory
Class PropertyConstraints

java.lang.Object
  extended by org.springframework.core.closure.support.AlgorithmsAccessor
      extended by org.springframework.rules.factory.PropertyConstraints

public class PropertyConstraints
extends AlgorithmsAccessor

Helper class for creating and composing constraints for a single domain object property.

Author:
Keith Donald

Constructor Summary
PropertyConstraints(String propertyName)
           
 
Method Summary
 PropertyConstraint all(Constraint[] valueConstraints)
           
 PropertyConstraint any(Constraint[] valueConstraints)
           
 PropertyConstraint eq(Object value)
           
 PropertyConstraint eqProperty(String otherPropertyName)
           
 PropertyConstraint gt(Comparable value)
           
 PropertyConstraint gte(Comparable value)
           
 PropertyConstraint gteProperty(String otherPropertyName)
           
 PropertyConstraint gtProperty(String otherPropertyName)
           
 PropertyConstraint inRange(Comparable min, Comparable max)
           
 PropertyConstraint inRangeProperties(String minProperty, String maxProperty)
           
 PropertyConstraint lt(Comparable value)
           
 PropertyConstraint lte(Comparable value)
           
 PropertyConstraint lteProperty(String otherPropertyName)
           
 PropertyConstraint ltProperty(String otherPropertyName)
           
 void setPropertyName(String propertyName)
           
 
Methods inherited from class org.springframework.core.closure.support.AlgorithmsAccessor
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst, forEach, forEach, getAlgorithms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyConstraints

public PropertyConstraints(String propertyName)
Method Detail

setPropertyName

public void setPropertyName(String propertyName)

all

public PropertyConstraint all(Constraint[] valueConstraints)

any

public PropertyConstraint any(Constraint[] valueConstraints)

eq

public PropertyConstraint eq(Object value)

lt

public PropertyConstraint lt(Comparable value)

lte

public PropertyConstraint lte(Comparable value)

gt

public PropertyConstraint gt(Comparable value)

gte

public PropertyConstraint gte(Comparable value)

eqProperty

public PropertyConstraint eqProperty(String otherPropertyName)

ltProperty

public PropertyConstraint ltProperty(String otherPropertyName)

lteProperty

public PropertyConstraint lteProperty(String otherPropertyName)

gtProperty

public PropertyConstraint gtProperty(String otherPropertyName)

gteProperty

public PropertyConstraint gteProperty(String otherPropertyName)

inRange

public PropertyConstraint inRange(Comparable min,
                                  Comparable max)

inRangeProperties

public PropertyConstraint inRangeProperties(String minProperty,
                                            String maxProperty)


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