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
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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ICollValidator
public ICollValidator(java.util.Hashtable keyValuePairs)
- Creates an ICollValidator object.
- Parameters:
keyValuePairs
- java.util.Hashtable
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
- Objectdescriptor
- 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
- Objectdescriptor
- 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.Objectdescriptor
- 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.Objectdescriptor
- com.ibm.dse.base.types.PropertyDescription- Returns:
- java.lang.Object