Business object attribute properties

Business object architecture defines various properties that apply to attributes. This section describes how the connector interprets several of these properties and describes how to set them when modifying a business object.

Name property

Each business object attribute must have a unique name.

Type property

Each business object attribute must have a type, such as Integer, String, or the type of a child business object. When the connector encounters an attribute of type Date, Long Text, or String, the connector wraps the value in quotation marks and handles the value as character data.

Cardinality property

Each business object attribute that represents a child or array of child business objects has the value of 1 or n, respectively, in this attribute. All attributes that represent child business objects also have a ContainedObjectVersion property (which specifies the child's version number) and a Relationship property (which specifies the value Containment).

Max length property

If the attribute is of type String, this property specifies the maximum length allowed for the attribute's value.

Key property

At least one simple attribute in each business object must be specified as the key. To define an attribute as a key, set this property to Yes. If the business object attribute is of type String, it is recommended that the data type in the database is of type Varchar instead of char.

Note:
The connector does not support specifying an attribute that represents a child business object or an array of child business objects as a key attribute.

If the key property is set to true for a simple attribute, the connector adds that attribute to the WHERE clause of SELECT, UPDATE, RETRIEVE, and DELETE SQL statements that it generates while processing the business object.

If the key property is set to true for an attribute in a child that stores the parent/child relationship in the child (both multiple-cardinality and single-cardinality), the connector uses the parent's primary keys in the WHERE clause of the SELECT statement, and it does not use the Key property. For information on specifying the name of business object attributes whose values are used to set the child's foreign-key attributes, see Application-specific information at the attribute level.

Foreign key property

The connector uses this property to determine whether an attribute is a foreign key.

Required property

The Required property specifies whether an attribute must contain a value.

If this property is specified for an attribute that represents a single-cardinality child business object, the connector requires the parent business object to contain a child business object for this attribute.

When the connector receives a business object with a Create request, the connector causes the Create operation to fail if both of the following conditions are true:

When the connector receives a business object with a Retrieve request and the business object does not have a valid value or a default value for a required attribute, the connector causes the retrieval operation to fail.

The connector does not use this property for attributes that contain an array of child business objects.

Note:
If the key attribute uses a sequence or counter or is populated by the database (UID=AUTO), it should not be marked as Required.

AppSpecificInfo

For information on this property, see Application-specific information at the attribute level.

Default value property

This property specifies a default value that the connector uses to populate a simple attribute if it is not populated with a value from the database table. The connector does not evaluate this property for attributes that represent a child business object or an array of child business objects.

The connector evaluates this property only if the UseDefaults configuration property is set to true. For more information, see Table 6.

Special attribute value

Simple attributes in business objects can have the special value, CxIgnore. When it receives a business object from the integration broker, the connector ignores all attributes with a value of CxIgnore. It is as if those attributes were invisible to the connector.

When the connector retrieves data from the database and the SELECT statement returns a null value for an attribute, the connector sets the value of that attribute to CxIgnore by default. If a value has been specified for the UNVL parameter of the attribute's application-specific information, the connector uses that value to represent the null.

Because the connector requires every business object to have at least one primary-key attribute, developers should ensure that WebSphere Business Integration Adapter business objects passed to the connector have at least one primary key that is not set to CxIgnore. The only exception to this requirement is a business object whose primary key is to be generated by the connector using a counter or sequence, or is generated by the database.

When the connector inserts data into the database and a business object attribute has no value specified, it uses the value specified by the attribute's UseNullValue property. For more information about UseNullValue, see UNVL=value in Table 11.

Copyright IBM Corp. 1997, 2003