Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


oracle.jbo.server.rules
Class JboListValidator

java.lang.Object
  extended byoracle.jbo.rules.AbstractValidator
      extended byoracle.jbo.server.rules.JboBaseValidator
          extended byoracle.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, mValidatingAttr

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

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
initialize, raiseException, setNewValue, setValidatingAttribute, setValidatingAttribute, vetoableChange

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

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.

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.

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


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