Valid Data

Determines whether the specified value is a valid data type for a specified attribute.

Inputs

Business object
The current business object (a BusObj object).

Attribute
A String that specifies the name of the attribute.

Value
The value for the attribute. Can be of type Object, BusObj, BusObjArray, String, long, int, double, float, or boolean.

Output

Returns true if the specified value is a valid data type; otherwise, returns false.

Notes

Checks the compatibility of the value passed in with the target attribute (as specified by the Attribute input). These are the criteria:

for primitive types (String, long, int, double, float, boolean) the value must be convertible to the data type of the attribute
for a BusObj the value must have the same type as that of the target attribute
for a BusObjArray the value must point to a BusObj or BusObjArray with the same (business object definition) type as that of the attribute
for an Object the value must be of type String, BusObj, or BusObjArray. The corresponding validation rules are then applied.

Related information

This function block is based on the BusObj.validData() method. For more information, see validData().

Copyright IBM Corp. 1997, 2004