org.springmodules.validation.util.condition.bean
Class AbstractBeanCondition

java.lang.Object
  extended by org.springmodules.validation.util.condition.AbstractCondition
      extended by org.springmodules.validation.util.condition.NonNullAcceptingCondition
          extended by org.springmodules.validation.util.condition.bean.AbstractBeanCondition
All Implemented Interfaces:
Condition
Direct Known Subclasses:
EqualPropertiesBeanCondition, PropertyBeanCondition

public abstract class AbstractBeanCondition
extends NonNullAcceptingCondition

A parent class to all bean related conditions. Such condition may perform checks on beans properties.

Author:
Uri Boness

Constructor Summary
AbstractBeanCondition()
           
 
Method Summary
protected abstract  boolean checkBean(BeanWrapper beanWrapper)
           
 boolean doCheck(Object object)
          See Condition.check(Object).
 
Methods inherited from class org.springmodules.validation.util.condition.NonNullAcceptingCondition
beforeObjectChecked
 
Methods inherited from class org.springmodules.validation.util.condition.AbstractCondition
afterObjectChecked, and, check, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBeanCondition

public AbstractBeanCondition()
Method Detail

doCheck

public final boolean doCheck(Object object)
See Condition.check(Object). This method creates a BeanWrapper instance of the checked object and delegates the call to checkBean(org.springframework.beans.BeanWrapper);

Specified by:
doCheck in class AbstractCondition
Parameters:
object - The object to be checked.
Returns:
true if the given object adheres to this condition, false otherwise.
Throws:
IllegalArgumentException - when the passed in object is null.

checkBean

protected abstract boolean checkBean(BeanWrapper beanWrapper)


Copyright © 2009. All Rights Reserved.