hasType()

Determines if the data type of the attribute matches a specified data type name.

Syntax

public boolean hasType(String attrName, int typeName);
public boolean hasType(int position, String typeName);

public boolean hasType(String attrName, int typeNum);
public boolean hasType(int position, String typeNum);

Parameters

attrName
Is the name of an attribute whose cardinality is tested.
position
Is an integer that specifies the ordinal position of an attribute in the business object's attribute list.
typeName
Is the string value of the data type of the attribute to test for. Use one of the string attribute-type constants in Table 123 to specify the data type.
typeNum
Is the numeric value of the data type of the attribute to test for. Use one of the numeric attribute-type constants in Table 124 to specify the data type.

Return values

Returns true if the attribute type matches the passed-in type name; otherwise, returns false.

Exceptions

AttributeNotFoundException
Thrown if the position or name specified is not valid for the definition of this business object.

See also

getTypeName(),, getTypeNum(),, hasName()

Copyright IBM Corporation 1997, 2004. All Rights Reserved.