getTypeName()

Retrieves the name of the attribute's data type, given the attribute's name or its position in the business object's attribute list.

Syntax

public String getTypeName(String attrName);
public String getTypeName(int position);

Parameters

attrName
Is the name of an attribute whose string value of its data type is retrieved.
position
Is an integer that specifies the ordinal position of an attribute in the business object's attribute list.

Return values

A String that contains the name of the attribute's data type. Compare this String value with the attribute-type constants shown in Table 123 to determine the type.

Table 123. String attribute-type constants
Attribute data type String attribute-type constant
Boolean BOOLSTRING
Business object: multiple cardinality MULTIPLECARDSTRING
Business object: single cardinality SINGLECARDSTRING
CIPHERTEXTSTRING
Date DATESTRING
Double DOUBSTRING
Float FLTSTRING
Integer INTSTRING
Invalid data type INVALID_TYPE_STRING
Long text LONGTEXTSTRING
String STRSTRING

Note:
The CWConnectorAttrType class defines the string attribute-type constants listed in Table 123.

Exceptions

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

See also

getTypeNum(),, hasType()

Copyright IBM Corporation 1997, 2004. All Rights Reserved.