com.ibm.dse.base.types
Class ICollValidator

java.lang.Object
  |
  +--com.ibm.dse.base.types.AbstractValidator
        |
        +--com.ibm.dse.base.types.ICollValidator

public class ICollValidator
extends AbstractValidator

This class is a Validator for compound business objects which are IndexedCollections. It checks if the inner elements of the indexed collection are valids, and also if the indexed collection size is between a 'minSize' and a 'maxSize', both defined within the keyValuePairs.

See Also:
Serialized Form

Fields inherited from class com.ibm.dse.base.types.AbstractValidator
keyValuePairs
 
Constructor Summary
ICollValidator(java.util.Hashtable keyValuePairs)
          Creates an ICollValidator object.
 
Method Summary
 java.lang.Object validate(java.lang.Object toValidate, PropertyDescription descriptor)
          Validates the object passed and if successful, the object is returned, otherwise an appropriate exception is thrown.
 java.lang.Object validateForType(java.lang.Object toValidate, PropertyDescription descriptor)
          Validates the object passed (that must be an indexed collection) and if successful, the object is returned, otherwise an appropriate exception is thrown.
protected  java.lang.Object validateICollSize(java.lang.Object toValidate, PropertyDescription descriptor)
          Checks that the indexed collection size lays between the minimum and the maximum values specified as parameters of the owner descriptor or as parameters of the validator.
protected  java.lang.Object validateInnerElements(java.util.Vector elements, PropertyDescription descriptor)
          Insert the method's description here.
 
Methods inherited from class com.ibm.dse.base.types.AbstractValidator
getParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICollValidator

public ICollValidator(java.util.Hashtable keyValuePairs)
Creates an ICollValidator object.
Parameters:
keyValuePairs - java.util.Hashtable
Method Detail

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 PropertyDescription descriptor)
                          throws DSETypeException
Validates the object passed and if successful, the object is returned, otherwise an appropriate exception is thrown.
Overrides:
validate in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
Throws:
DSETypeException - Validation is unsuccessful.

validateForType

public java.lang.Object validateForType(java.lang.Object toValidate,
                                        PropertyDescription descriptor)
                                 throws DSETypeException
Validates the object passed (that must be an indexed collection) and if successful, the object is returned, otherwise an appropriate exception is thrown. Validation will succeed if all elements in the indexed collection are valid.
Overrides:
validateForType in class AbstractValidator
Parameters:
toValidate - Object
descriptor - PropertyDescription
Throws:
DSETypeException - Thrown if the validation is unsuccessful.

validateICollSize

protected java.lang.Object validateICollSize(java.lang.Object toValidate,
                                             PropertyDescription descriptor)
                                      throws DSETypeException
Checks that the indexed collection size lays between the minimum and the maximum values specified as parameters of the owner descriptor or as parameters of the validator.
Parameters:
toValidate - java.lang.Object
descriptor - com.ibm.dse.base.types.PropertyDescription
Returns:
java.lang.Object

validateInnerElements

protected java.lang.Object validateInnerElements(java.util.Vector elements,
                                                 PropertyDescription descriptor)
                                          throws DSETypeException
Insert the method's description here. Creation date: (10/6/00 4:29:04 PM)
Parameters:
toValidate - java.lang.Object
descriptor - com.ibm.dse.base.types.PropertyDescription
Returns:
java.lang.Object