com.ibm.dse.base.types
Interface Validation
- All Known Implementing Classes:
- AbstractValidator
- public interface Validation
This interface is implemented by all Validators which descend from the abstract
implementation, AbstractValidator.
Validators provide behaviour to facilitate the validation of business objects
in accordance with specific business rules. The majority of such behaviour is
Type specific.
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 |
validate(java.lang.String toValidate,
PropertyDescription descriptor)
Validates the String passed by first unformatting it to an Object of the appropriate Type and
if successful, the object is returned, otherwise an appropriate exception is thrown. |
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.
Parameters required by the specific type validator may be taken from the owner descriptor
by using the descriptor passed as argument.
- Parameters:
toValidate
- Objectdescriptor
- PropertyDescription- Throws:
- DSETypeException - Validation is unsuccessful.
validate
public java.lang.Object validate(java.lang.String toValidate,
PropertyDescription descriptor)
throws DSETypeException
- Validates the String passed by first unformatting it to an Object of the appropriate Type and
if successful, the object is returned, otherwise an appropriate exception is thrown.
Parameters required by the specific type validator may be taken from the owner descriptor
by using the descriptor passed as argument.
- Parameters:
toValidate
- Stringdescriptor
- PropertyDescription- Throws:
- DSETypeException - Validation is unsuccessful.