org.springmodules.validation.util.condition.bean
Class PropertyBeanCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.NonNullAcceptingCondition
org.springmodules.validation.util.condition.bean.AbstractBeanCondition
org.springmodules.validation.util.condition.bean.PropertyBeanCondition
- All Implemented Interfaces:
- Condition
public class PropertyBeanCondition
- extends AbstractBeanCondition
An AbstractBeanCondition
implementation that checks the value of a specific property of the checked bean
using a specific condition.
- Author:
- Uri Boness
Constructor Summary |
PropertyBeanCondition(String propertyName,
Condition propertyCondition)
Constructs a new PropertyBeanCondition with a given name of the property to be checked by the given condition. |
Method Summary |
protected boolean |
checkBean(BeanWrapper bean)
Checks the value of the property of the given bean using the property condition associated with this condition. |
Condition |
getPropertyCondition()
Returns the condition that is used to checkCalendar the property of the checked bean. |
String |
getPropertyName()
Return the property name associated with this condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyBeanCondition
public PropertyBeanCondition(String propertyName,
Condition propertyCondition)
- Constructs a new PropertyBeanCondition with a given name of the property to be checked by the given condition.
- Parameters:
propertyName
- The name of the property to be checked.propertyCondition
- The condition that will be used to checkCalendar the property value.
checkBean
protected boolean checkBean(BeanWrapper bean)
- Checks the value of the property of the given bean using the property condition associated with this condition. The
property to be checked is resolved by the property name associated with this condition.
- Specified by:
checkBean
in class AbstractBeanCondition
- Parameters:
bean
- The bean to be checked.
- Returns:
true
if the property condition associated with this condition returns true
when
checking the bean's property, false
otherwise.
getPropertyName
public String getPropertyName()
- Return the property name associated with this condition.
- Returns:
- The property name associated with this condition.
getPropertyCondition
public Condition getPropertyCondition()
- Returns the condition that is used to checkCalendar the property of the checked bean.
- Returns:
- The condition that is used to checkCalendar the property of the checked bean.
Copyright © 2009. All Rights Reserved.