org.springmodules.validation.bean.conf
Class CascadeValidation

java.lang.Object
  extended by org.springmodules.validation.bean.conf.CascadeValidation

public class CascadeValidation
extends Object

Represents a cascade validation definition. Holds the name of the property to which the validation will be cascaded and the applicability condition to determine whether the cascading should be applied.

Author:
Uri Boness

Constructor Summary
CascadeValidation(String propertyName)
          Constructs a new CascadeValidation with a given property name.
CascadeValidation(String propertyName, Condition applicabilityCondition)
          Constructs a new CascadeValidation with a given property name and applicability condition.
 
Method Summary
 boolean equals(Object object)
           
 Condition getApplicabilityCondition()
          Returns the condition that determines whether the cascading should be applied.
 String getPropertyName()
          Returns the name of the property to which the validation will be cascaded.
 int hashCode()
           
 void setApplicabilityCondition(Condition applicabilityCondition)
          Sets the condition that determines whether the cascading should be applied.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CascadeValidation

public CascadeValidation(String propertyName)
Constructs a new CascadeValidation with a given property name. This cascading always applies.

Parameters:
propertyName - The name of the property to which the validation will be cascaded.

CascadeValidation

public CascadeValidation(String propertyName,
                         Condition applicabilityCondition)
Constructs a new CascadeValidation with a given property name and applicability condition.

Parameters:
propertyName - The name of the property to which the validation will be cascaded.
applicabilityCondition - The condition to determine whether the cascading will be applied.
Method Detail

getPropertyName

public String getPropertyName()
Returns the name of the property to which the validation will be cascaded.

Returns:
The name of the property to which the validation will be cascaded.

getApplicabilityCondition

public Condition getApplicabilityCondition()
Returns the condition that determines whether the cascading should be applied.

Returns:
The condition that determines whether the cascading should be applied.

setApplicabilityCondition

public void setApplicabilityCondition(Condition applicabilityCondition)
Sets the condition that determines whether the cascading should be applied.

Parameters:
applicabilityCondition - The condition that determines whether the cascading should be applied.

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009. All Rights Reserved.