Business Components

oracle.jbo.server
Class JboMandatoryAttributesValidator

java.lang.Object
  |
  +--oracle.jbo.server.JboMandatoryAttributesValidator

public class JboMandatoryAttributesValidator
extends java.lang.Object
implements JbiValidator

Implements non-null validation for mandatory attributes. This validation rule is applied by the framework to an Entity Object that has the mandatory flag set for any of its an attributes. The method isMandatory() identifies manditory attributes.

This validator is invoked by an Entity Objects's validate() method to confirm that its mandatory attributes are non-null. If any attribute is null, AttrValException is thrown. The framework does not perform this validation when an attribute value is changed, but only when its Enitity Object is validated.

Since:
JDeveloper 3.0
See Also:
Entity, EntityDefImpl

Constructor Summary
JboMandatoryAttributesValidator()
          Creates a default validator.
 
Method Summary
 java.lang.String getDescription()
          Gets the description of this validator.
 void setDescription(java.lang.String description)
          Sets the description of this validator.
 java.lang.String toString()
          Internal: Applications should not use this method.
 boolean validateValue(java.lang.Object value)
          Not implemented for this class.
 void vetoableChange(PropertyChangeEvent evObj)
          Validates the Entity Object's mandatory attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JboMandatoryAttributesValidator

public JboMandatoryAttributesValidator()
Creates a default validator.
Method Detail

vetoableChange

public void vetoableChange(PropertyChangeEvent evObj)
                    throws JboException
Validates the Entity Object's mandatory attributes.
Parameters:
evObj - an event indicating the attributes to be validatated.
Throws:
JboException - if any attributes are found to be null.

validateValue

public boolean validateValue(java.lang.Object value)
Not implemented for this class.
Specified by:
validateValue in interface JbiValidator
Returns:
true.

toString

public java.lang.String toString()
Internal: Applications should not use this method.

Overrides:
toString in class java.lang.Object

getDescription

public java.lang.String getDescription()
Gets the description of this validator.
Specified by:
getDescription in interface JbiValidator
Returns:
a documentation string.

setDescription

public void setDescription(java.lang.String description)
Sets the description of this validator.
Specified by:
setDescription in interface JbiValidator
Parameters:
description - a documentation string.

Business Components