Mapping attributes: COM, Java, and business object

This section provides a list of the COM types defined in a type library and their corresponding Java constructs and business object attributes. For all business object attributes that are not child business objects, the data type is String. In a business object, the ASI holds the actual data type of the attribute and is used when invoking methods against the Java proxy object.

For details about business object ASI, see Application-specific information.

Note:
If a COM type is not supported by the COMProxy interface tool, then it is not supported by the connector.

Table 9. Object mapping: COM, JAVA, and business object

COM type Java primitive Java boxed COMProxy internal Business object Attribute ASI type=
Float float Float VT_R4 Float float
Float* float[] Float[] VT_R4 | VT_BYREF Float float_refererence
BSTR No primitive type exists String VT_BSTR String String
BSTR* No primitive type exists String[] VT_BSTR | VT_BYREF String String_reference
Int int Integer VT_I4 Integer int
int* int[] Int[] VT_I4 | VT_BYREF Integer int_reference
IDispatch* No primitive type exists Object VT_DISPATCH Business object proxy
IDispatch** No primitive type exists Object[] VT_DISPATCH | VT_ARRAY Business object ArrayOf_proxy
Short short Short VT_I2 Integer short
Short* short[] Short[] VT_I2 | VT_BYREF Integer short_reference
VARIANT No primitive type exists Object VT_VARIANT String variant
VARIANT_BOOL boolean Boolean VT_BOOL Boolean boolean
VARIANT_BOOL* boolean[] Boolean[] VT_BOOL | VT_BYREF Boolean boolean_reference
Long int Integer VT_I4 Integer int
Long* int[] Integer VT_I4 | VT_BYREF Integer int_reference
CURRENCY long Long VT_CY Integer long
CURRENCY* long[] Long[] VT_CY | VT_BYREF Integer long_reference
DATE No primitive type exists java.util.Date VT_DATE Date Date
DATE* No primitive type exists Date[] VT_DATE | VT_BYREF Date Date_reference
double double Double VT_R8 Double double
double* double[] Double[] VT_R8 | VT_BYREF Double double_reference
unsigned char byte Byte VT_UI1 Integer byte
unsigned char* byte[] Byte[] VT_UI1 | VT_BYREF Integer byte_reference
Decimal No primitive type exists Not supported Not supported Not supported Not supported
Decimal* No primitive type exists Not supported Not supported Not supported Not supported
hyper No primitive type exists Not supported Not supported Not supported Not supported
hyper* No primitive type exists Not supported Not supported Not supported Not supported
Small No primitive type exists Not supported Not supported Not supported Not supported
Small* No primitive type exists Not supported Not supported Not supported Not supported
SAFEARRAY(type) type[] Type[] VT_ARRAY Cardinality n business object child with single attribute ArrayOf_type
Enum int Integer VT_INT Integer int
Note:
In cases where the attribute is not intended to be de-referenced, the ASI type=PlaceholderOnly should be used. This tells the adapter to not populate this attribute. The attribute may still be used as part of a multi-call flow if it is either marked as a foreign key (IsForeignKey is set to true), or has the ASI use_attribute_value pointing to a compatible attribute.

Array types

Note the following about array types:

Copyright IBM Corp. 1997, 2003