Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


oracle.jbo.server.rules
Class JboListValidator

java.lang.Object
  |
  +--oracle.jbo.server.rules.JboBaseValidator
        |
        +--oracle.jbo.server.rules.JboListValidator
All Implemented Interfaces:
java.util.EventListener, JbiValidator, VetoableChangeListener
Direct Known Subclasses:
JboSQLListValidator, JboVOListValidator

public class JboListValidator
extends JboBaseValidator
implements JbiValidator

A validator that tests for the presence of a literal value in a list of pre-defined values.

Since:
Jdeveloper 3.0

Field Summary

 

Fields inherited from class oracle.jbo.server.rules.JboBaseValidator
mLValue, MSG_BUNDLE_SUFFIX

 

Constructor Summary
JboListValidator()
          Creates an uninitialized list validator.
JboListValidator(boolean inverse, java.util.Vector vec)
          Creates a list validator.

 

Method Summary
static java.util.Vector convertToVector(java.lang.String listVal)
          Converts a string representation of values to a vector.
 java.util.Vector getList()
          Gets this validator's list of comparison values.
 void setList(java.util.Vector vec)
          Sets this validator's list of comparison values.
 java.lang.String toString()
          Internal: For debugging purposes only.
 boolean validateValue(java.lang.Object value)
          Validate that an object is present in a list of values.

 

Methods inherited from class oracle.jbo.server.rules.JboBaseValidator
getDescription, getErrorMsgId, getInverse, initialize, raiseException, setDescription, setErrorMsgId, setInverse, setNewValue, setValidatingAttribute, setValidatingAttribute, setValidatingAttributeName, vetoableChange

 

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

 

Methods inherited from interface oracle.jbo.server.rules.JbiValidator
getDescription, setDescription

 

Methods inherited from interface oracle.jbo.server.util.VetoableChangeListener
vetoableChange

 

Constructor Detail

JboListValidator

public JboListValidator()
Creates an uninitialized list validator.

Invoke setList() to provide a list of comparison values.


JboListValidator

public JboListValidator(boolean inverse,
                        java.util.Vector vec)
Creates a list validator.
Parameters:
inverse - if true the logic of this validator's test is inverted.
vec - a list of comparison values.
Method Detail

validateValue

public boolean validateValue(java.lang.Object value)
Validate that an object is present in a list of values.

The list of test values is set by setList.

This method is called by JboBaseValidator#vetoableChange().

Specified by:
validateValue in interface JbiValidator
Specified by:
validateValue in class JboBaseValidator
Parameters:
value - the object to be validated.
Returns:
true if value is in this validator's list of values.

setList

public void setList(java.util.Vector vec)
Sets this validator's list of comparison values.
Parameters:
vec - a list of values.

getList

public java.util.Vector getList()
Gets this validator's list of comparison values.
Returns:
a list of values.

toString

public java.lang.String toString()
Internal: For debugging purposes only.
Overrides:
toString in class java.lang.Object

convertToVector

public static java.util.Vector convertToVector(java.lang.String listVal)
Converts a string representation of values to a vector.
Parameters:
listVal - a string containing values separated by ":" characters.

Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


 

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