|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.rules.JboGenericValidator
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.
TypeFactory
,
Serialized FormConstructor 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. |
void |
validate(JboValidatorContext ctx)
Tests the validity of an attribute value. |
boolean |
validateValue(java.lang.Object value)
Validates that a domain object is within this validators precision and range or set of values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JboGenericValidator()
Use "set" methods to provide validation parameters.
Method Detail |
public boolean validateValue(java.lang.Object value)
value
- the object to be validated.
true
if the object's precision and value are within specified
limits, and the validator is updateable.public java.util.Vector getList()
public java.lang.Object getMin()
public java.lang.Object getMax()
public java.lang.String getPrec()
public boolean isUpdateable()
false
if validateValue(java.lang.Object)
is forced
to return false
, and #vetoableChange(PropertyChangeEvent)
is forced to fail.
true
if validation is performed.
public void setList(java.util.Vector vec)
vec
- a list containing the new valid values.public void setMin(java.lang.Object minValue)
minValue
- the new least valid value.public void setMax(java.lang.Object maxValue)
maxValue
- the new greatest valid value.public void setPrec(java.lang.String prec)
prec
- a string representation of the new number of significant digits.public void setUpdateable(boolean val)
val
- if false
, validateValue()
is forced
to return false
, and vetoableChange()
is forced to fail.public void setTypeInfo(java.lang.String type)
public void setLhs(DomainInterface lValue)
public java.lang.String toString()
"Range(min, max)"
.public void validate(JboValidatorContext ctx)
JboValidatorInterface
validate
in interface JboValidatorInterface
true
if the value is valid.public java.lang.String getDescription()
getDescription
in interface JboValidatorInterface
public void setDescription(java.lang.String description)
setDescription
in interface JboValidatorInterface
description
- a documentation string.
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.