BusinessObject()

Creates an instance of the BusinessObject class (a business object). The new business object refers to an instance of the BusObjSpec class (a business object definition), either the latest version of the business object definition or a version that you specify.

Syntax

BusinessObject(char * busObjName);
 BusinessObject(char * busObjName, CxVersion &version);
 BusinessObject(char * busObjName, char * localeName);
 

Parameters

busObjName [in]
is the name of the new business object.

version [in]
is the version number of the business object definition to which the new business object refers. If you do not specify version, the new business object refers to the latest version of the business object definition. The version number is a String value.

localeName[in]
is the name of the locale to associate with the business object.

Return values

None.

Notes

The BusinessObject() constructor creates a new business object instance whose type is the business object definition you specify in busObjName.

A business object (instance of the BusinessObject class) contains a set of attribute values. The definitions of the attributes are in the business object definition to which the business object refers. For each attribute, the business object definition defines a name, a position in the list of attributes, a data type, and several properties. The business object definition also contains the list of verbs that the business object supports.

If you specify a localeName, this locale applies to the data in the business object, not to the name of the business object definition or its attributes (which must be in English characters). For a description of the format for locale, see Design considerations for an internationalized connector.

To determine whether the business object constructor has failed, check the business object definition pointer using the getSpecFor() method in this class. The getSpecFor() method will return NULL if the constructor has failed. The constructor might fail if an invalid name is specified.

Examples

BusinessObject *pObj = new BusinessObject("Customer");
 

See also

See also the description of the BusObjSpec class.

Copyright IBM Corp. 1997, 2003