org.infoglue.cms.util.validators
Class ConstraintRule

java.lang.Object
  |
  +--org.infoglue.cms.util.validators.ConstraintRule

public class ConstraintRule
extends java.lang.Object

ConstraintRule.java Created on 2002-sep-13

Author:
Stefan Sik, ss@frovi.com ss This class defines a constraint rule for a specified field.

Field Summary
 boolean required
           
 boolean unique
           
 
Constructor Summary
ConstraintRule(int constraintType, java.lang.String fieldName)
           
 
Method Summary
 int getConstraintType()
           
 java.lang.String getFieldName()
           
 Range getValidRange()
           
 java.lang.Object getValue()
           
 boolean isRequired()
          Returns the required.
 boolean isUnique()
          Returns the unique.
 void setRequired(boolean required)
          Sets the required.
 void setUnique(boolean unique)
          Sets the unique.
 void setValidRange(Range validRange)
           
 void setValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unique

public boolean unique

required

public boolean required
Constructor Detail

ConstraintRule

public ConstraintRule(int constraintType,
                      java.lang.String fieldName)
Method Detail

getConstraintType

public int getConstraintType()

getFieldName

public java.lang.String getFieldName()

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)

getValidRange

public Range getValidRange()

setValidRange

public void setValidRange(Range validRange)

isRequired

public boolean isRequired()
Returns the required.

Returns:
boolean

isUnique

public boolean isUnique()
Returns the unique.

Returns:
boolean

setRequired

public void setRequired(boolean required)
Sets the required.

Parameters:
required - The required to set

setUnique

public void setUnique(boolean unique)
Sets the unique.

Parameters:
unique - The unique to set