Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server.rules
Class JboGenericValidator

    java.lang.Object
      |
      +--oracle.jbo.server.rules.JboGenericValidator

public class JboGenericValidator
extends java.lang.Object
implements GenericValidator, java.io.Serializable

A validator for domain attributes.

This validator tests whether a domain object lies in a specified range, or is one of a set of specified values. The object's precision may also be validated.

An object will be tested against a list of values if the list is not `null`. Use `setList()` to provide the list. When the list is `null` (the default), the object is tested instead against the range, which is specified by `setMin()` and `setMax()`.

Use `setPrec()` to specify the precision.

Since:
  Jdeveloper 3.0
See Also:
  `TypeFactory`, Serialized Form

Constructor Summary
`JboGenericValidator()` Creates an uninitialized validator.

Method Summary
`java.lang.String` | `getDescription()` Gets the textul description of this validator.
`java.util.Vector` | `getList()` Gets the list of valid values.
`java.lang.Object` | `getMax()` Gets the maximum bound of the valid range.
`java.lang.Object` | `getMin()` Gets the minimum bound of the valid range.
`java.lang.String` | `getPrec()` Gets the SQL numeric precision.
`boolean` | `isUpdateable()` Reports whether this validator allows updating.
`void` | `setDescription(java.lang.String description)` Sets the textul description of this validator.
`void` | `setLhs(DomainInterface lValue)` Internal: Applications should not use this method.
`void` | `setList(java.util.Vector vec)` Sets the list of valid values.
`void` | `setMax(java.lang.Object maxValue)` Sets the maximum bound of the valid range.
`void` | `setMin(java.lang.Object minValue)` Sets the minimum bound of the valid range.
`void` | `setPrec(java.lang.String prec)` Sets the SQL numeric precision.
`void` | `setTypeInfo(java.lang.String type)`
`void` | `setUpdateable(boolean val)` Enables or disables validation.
`java.lang.String` | `toString()` Generates a Java code fragment that invokes this validator.
`boolean` | `validateValue(java.lang.Object value)` Validates that a domain object is within this validators precision and range or set of values.
`void` | `vetoableChange(PropertyChangeEvent evObj)` Invokes `validateValue()` on a value contained in a constrained property.

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

Constructor Detail

### JboGenericValidator

    public JboGenericValidator()

  Creates an uninitialized validator.

  Use "set" methods to provide validation parameters.

Method Detail

### validateValue

    public boolean validateValue(java.lang.Object value)

  Validates that a domain object is within this validators precision and range or set of values.
  Parameters:
    `value` - the object to be validated.
  Returns:
    `true` if the object's precision and value are within specified limits, and the validator is updateable.

### getList

    public java.util.Vector getList()

  Gets the list of valid values.

  Returns:
    a vector containing the valid values.

### getMin

    public java.lang.Object getMin()

  Gets the minimum bound of the valid range.

  Returns:
    the least valid value.

### getMax

    public java.lang.Object getMax()

  Gets the maximum bound of the valid range.

  Returns:
    the greatest valid value.

### getPrec

    public java.lang.String getPrec()

  Gets the SQL numeric precision.

  Returns:
    a string representation of the number of significant digits.

### isUpdateable

    public boolean isUpdateable()

  Reports whether this validator allows updating.

  Returns:

    `false` if `validateValue()` is forced to return `false`, and `vetoableChange` is forced to fail.

    `true` if validation is performed.

### setList

    public void setList(java.util.Vector vec)

  Sets the list of valid values.

  Parameters:
    `vec` - a list containing the new valid values.

### setMin

    public void setMin(java.lang.Object minValue)

  Sets the minimum bound of the valid range.

  Parameters:
    `minValue` - the new least valid value.

### setMax

    public void setMax(java.lang.Object maxValue)

  Sets the maximum bound of the valid range.

  Parameters:
    `maxValue` - the new greatest valid value.

### setPrec

    public void setPrec(java.lang.String prec)

  Sets the SQL numeric precision.

  Parameters:
    `prec` - a string representation of the new number of significant digits.

### setUpdateable

    public void setUpdateable(boolean val)

  Enables or disables validation.

  Parameters:
    `val` - if `false`, `validateValue()` is forced to return `false`, and `vetoableChange()` is forced to fail.

### setTypeInfo

    public void setTypeInfo(java.lang.String type)

### setLhs

    public void setLhs(DomainInterface lValue)

  Internal: Applications should not use this method.

### toString

    public java.lang.String toString()

  Generates a Java code fragment that invokes this validator.
  Overrides:
    toString in class java.lang.Object
  Returns:
    `"Range(min, max)"`.

### vetoableChange

    public void vetoableChange(PropertyChangeEvent evObj)
                        throws JboException

  Invokes `validateValue()` on a value contained in a constrained property.

  .

  Parameters:
    `evObject` - a `PropertyChangeEvent()` containing a property to be validated.
  Throws:
    JboException - if validation fails, with `CSMessageBundle` error code `EXC_VAL_ATTR_SET_FAILED`.

### getDescription

    public java.lang.String getDescription()

  Gets the textul description of this validator.
  Returns:
    a documentation string.

### setDescription

    public void setDescription(java.lang.String description)

  Sets the textul description of this validator.
  Parameters:
    `description` - a documentation string.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD