Retrieves the numeric type code for the data type of an attribute, given the attribute's name
or its position in the business object's attribute list.
Syntax
public int getTypeNum(String attrName);
public int getTypeNum(int position);
Parameters
- attrName
- Is the name of an attribute whose numeric 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
An integer that specifies the data type of the attribute.
Compare this integer value with the attribute-type constants shown
in Table 122 to
determine the type.
Table 122. Numeric attribute-type
constants
Attribute data
type |
Numeric
attribute-type constant |
Boolean |
BOOLEAN
|
|
CIPHERTEXT
|
Date |
DATE
|
Double |
DOUBLE
|
Float |
FLOAT
|
Integer |
INTEGER
|
Invalid data
type |
INVALID_TYPE_NUM
|
Long
text |
LONGTEXT
|
Object |
OBJECT
|
String |
STRING
|
- Note:
- The CWConnectorAttrType class defines the numeric
attribute-type constants listed in Table 122.
Exceptions
- AttributeNotFoundException
- Thrown if the position or name specified is not valid for the
definition of this business object.
See also
getTypeName(),,
hasType()
