org.beanfabrics.model
Class AbstractValuePM.MandatoryValidationRule

java.lang.Object
  extended by org.beanfabrics.model.AbstractValuePM.MandatoryValidationRule
All Implemented Interfaces:
ValidationRule
Enclosing class:
AbstractValuePM

public class AbstractValuePM.MandatoryValidationRule
extends java.lang.Object
implements ValidationRule

This rule evaluates to invalid if the PM's "mandatory" attribute is true and the PM is empty.

See Also:
AbstractValuePM.isMandatory(), IValuePM.isEmpty()

Constructor Summary
AbstractValuePM.MandatoryValidationRule()
           
 
Method Summary
 ValidationState validate()
          Produces a fresh ValidationState.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractValuePM.MandatoryValidationRule

public AbstractValuePM.MandatoryValidationRule()
Method Detail

validate

public ValidationState validate()
Produces a fresh ValidationState. A null return value indicates that this rule has been successfully validated. A not- null value indicates that this rule has found an invalid state.

Specified by:
validate in interface ValidationRule
Returns:
the fresh validation result of this rule.