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.
Table 14. 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 the following about array types: