com.ibm.dse.tools.workbench.base
Class CheckConstraint

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.CheckConstraint

public class CheckConstraint
extends java.lang.Object

This class represents a check constraint for a column.

Only lists of valid values are supported.


Field Summary
protected  java.lang.String[] allowedValues
          The list of valid values
protected  int column
          The column afected by the check costraint
 
Constructor Summary
CheckConstraint(int column, java.lang.String[] values)
          This constructor creates a CheckConstraint object.
 
Method Summary
 java.lang.String[] getAllowedValues()
          Returns the list of valid values
 int getColumn()
          Returns the column identifier of the check constraint.
 boolean isValidValue(java.lang.String value)
          Checks if this value is in the list of valid values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

column

protected int column
The column afected by the check costraint

allowedValues

protected java.lang.String[] allowedValues
The list of valid values
Constructor Detail

CheckConstraint

public CheckConstraint(int column,
                       java.lang.String[] values)
This constructor creates a CheckConstraint object.
Parameters:
column - int The column identifier afected by the constraint.
values - java.lang.String[] The list of valid values.
Method Detail

getAllowedValues

public java.lang.String[] getAllowedValues()
Returns the list of valid values
Returns:
java.lang.String[]

getColumn

public int getColumn()
Returns the column identifier of the check constraint.
Returns:
int

isValidValue

public boolean isValidValue(java.lang.String value)
Checks if this value is in the list of valid values
Parameters:
value - java.lang.String The value to be checked.
Returns:
boolean