Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.rules
Class JboAbstractValidator

`java.lang.Object
oracle.jbo.rules.AbstractValidator
oracle.jbo.rules.JboAbstractValidator`

Direct Known Subclasses:
  JboCompareValidator, JboLengthValidator, JboListValidator, JboMethodValidator, JboRangeValidator, JboRegExpValidator

public abstract class JboAbstractValidator
extends AbstractValidator

The superclass for all pre-defined validators.

This class implements the basic functionality of storing the value of either an attribute to be validated, or the entity or application module reference on which validation is to be invoked. Subclasses must provide `validateValue`, which performs the actual validation test.

Since:
  Jdeveloper 3.0

Field Summary
`protected AttributeDef` | `mValidatingAttr`
`protected java.lang.String` | `mValidatingAttrName`

Fields inherited from class oracle.jbo.rules.AbstractValidator
`mbInverse, mDescription, mErrorMessageClass, mMsgId`

Constructor Summary
`JboAbstractValidator()`

Method Summary
`java.lang.String` | `getValidatingAttributeName()`
`protected java.lang.Object` | `getValueToValidate(JboValidatorContext evObj)`
`protected void` | `initialize(JboValidatorContext evObj)`
`protected void` | `setNewValue(java.lang.Object newValue)` When the newValue is an Entity, get the attribute's value by using the getAttribute method on the entity.
`void` | `setValidatingAttribute(AttributeDef attr)` Sets the validating attribute.
`void` | `setValidatingAttribute(StructureDef beanInfo, java.lang.String str)` Sets the validating attribute by name.
`void` | `setValidatingAttributeName(java.lang.String name)`
`void` | `validate(JboValidatorContext evObj)`
`abstract boolean` | `validateValue(java.lang.Object value)` Validates an object.

Methods inherited from class oracle.jbo.rules.AbstractValidator
`convertToJava, getDescription, getErrorMessageClass, getErrorMsgId, getInverse, setDescription, setErrorMessageClass, setErrorMsgId, setInverse`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### mValidatingAttr

    protected AttributeDef mValidatingAttr

### mValidatingAttrName

    protected java.lang.String mValidatingAttrName

Constructor Detail

### JboAbstractValidator

    public JboAbstractValidator()

Method Detail

### initialize

    protected void initialize(JboValidatorContext evObj)

### validateValue

    public abstract boolean validateValue(java.lang.Object value)

  Validates an object.

  Subclasses must implement this method.

  Parameters:
    `value` - the object to be validated.
  Returns:
    `true` if the object is valid.
  Throws:
    `java.lang.Exception` - if validation cannot be performed.

### validate

    public void validate(JboValidatorContext evObj)

### setNewValue

    protected void setNewValue(java.lang.Object newValue)
                        throws java.lang.Exception

  When the newValue is an Entity, get the attribute's value by using the getAttribute method on the entity. Otherwise, newValue should be a value to compare in this validator.
  Parameters:
    `newValue` - either the attribute's value or a value to use to compare in the validator.
  Throws:
    `java.lang.Exception`

### getValueToValidate

    protected java.lang.Object getValueToValidate(JboValidatorContext evObj)

### setValidatingAttributeName

    public void setValidatingAttributeName(java.lang.String name)

  Overrides:
    `setValidatingAttributeName` in class `AbstractValidator`

### setValidatingAttribute

    public void setValidatingAttribute(AttributeDef attr)

  Sets the validating attribute.
  Parameters:
    `attr` - an attribute.

### setValidatingAttribute

    public void setValidatingAttribute(StructureDef beanInfo,
                                       java.lang.String str)

  Sets the validating attribute by name.

  This variant is used when the validator is attached to an entity, rather than to an attribute.

  Parameters:
    `beanInfo` - the entity containing the attribute.
    `str` - an attribute name as a string.

### getValidatingAttributeName

    public java.lang.String getValidatingAttributeName()

  Overrides:
    `getValidatingAttributeName` in class `AbstractValidator`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.