This topic describes application-specific information (ASI) for attributes and lists the supported parameters with their descriptions.
The application-specific information for attributes differs depending on whether the attribute is a simple attribute or an attribute that represents a child or an array of child business objects. The application-specific information for an attribute that represents a child also differs depending on whether the parent-child relationship is stored in the child or in the parent.
For simple attributes, the format for application-specific information consists of a number of parameters and their values. The format of attribute application-specific information is shown in the following example section of an .xsd file:
<jdbcasi:ColumnName>pkey</jdbcasi:ColumnName> <jdbcasi:PrimaryKey>true</jdbcasi:PrimaryKey> <jdbcasi:FixedChar>true</jdbcasi:FixedChar> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> <simpleType> <restriction base="string"> <maxLength value="10"/> </restriction> </simpleType> </element> <element name="custCode" type="string"> <annotation> <appinfo source="WBI"> <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:ColumnName>ccode</jdbcasi:ColumnName> <jdbcasi:ForeignKey>custinfoObj/custCode</jdbcasi:ForeignKey> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> </element> <element name="firstName" type="string"> <annotation> <appinfo source="WBI"> <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:ColumnName>fname</jdbcasi:ColumnName> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> </element> <element name="lastName" type="string"> <annotation> <appinfo source="WBI"> <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:ColumnName>lname</jdbcasi:ColumnName> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> </element>
The only required parameter for a simple attribute to be processed by the connector is the column name. For example, this is the format to specify only the column name, where ccode stands for customer code:
<jdbcasi:ColumnName>ccode</jdbcasi:ColumnName>
The attribute ASI parameters that are enabled for use with bidirectional languages are ColumnName and ForeignKey. The format of these parameters is transformed based on the attributes set for the BiDi.Metadata property. For more information on this property, see "Configuration properties" in the "Reference" section. For more information on bidirectional properties, see the bidirectional support general technical paper and the adapter technical paper on the IBM developerWorks(R) Web site.
The table titled, "Parameters in attribute application-specific information" lists each parameter and its description.
Parameters in attribute application-specific information
Parameter | Description |
---|---|
ByteArray | If true, the adapter reads and writes binary data to the database and sends that data as a string to the application server. By default the value is false. For more information, see "Working with binary data." |
ColumnName | The value of this parameter is the name of the database column for this attribute. This is enabled for use with bidirectional languages. |
FixedChar | This parameter specifies whether the attribute is of fixed length when the columns in the table are of type CHAR, not VARCHAR. For example, if a particular attribute is linked to a column that is of type CHAR, the adapter pads the attribute value with blanks to the maximum length of the attribute when querying the database. By default the value is false. This parameter needs to be updated manually in the business object .xsd file. You can edit the file either in text mode or by using the Business Object Editor in WebSphere Integation Developer. Ensure that no validation errors occur in the .xsd after it has been updated. See the code example for this parameter following this table. |
ForeignKey | The value of this property depends on whether the parent/child relationship
is stored in the parent business object or in the child. If it is stored in the parent, set the value to include both the type of the child business object and the name of the attribute in the child to be used as the foreign key (ChildBOname/ChildPropertyName). If it is stored in the child, set the value to include only the name of the attribute in the parent to be used as the foreign key. If an attribute is not a foreign key, do not include this parameter in the application-specific information. This parameter is enabled for use with bidirectional languages. |
KeepRelationship | If true, this parameter prevents the deletion of a child business object during an update operation. |
OrderBy | If a value is specified for this parameter and the attribute is in a child business object, the adapter uses the value of the attribute in the ORDER BY clause of retrieval queries. The adapter can retrieve child business objects in either ascending order (ASC) or descending order (DESC). If you do not include this parameter in the application-specific information, the adapter does not use this attribute when specifying retrieval order. |
Ownership | This parameter specifies that a child business object is owned by the parent. If true, then create, update, and delete operations on the child business object are allowed. If false, then none of these updates can be applied to the child business object. When its parent is created, the existence of the child is validated to ensure that relationship integrity is maintained in the database. |
PrimaryKey | If the value is true, this implies that the column associated with this attribute is a key in the corresponding table in the database. |
UniqueIdentifier (UID) | The adapter uses this parameter to generate the unique ID for the business object. It supports the generation of sequences and identity columns (UID=AUTO|SequenceName). Sequences can be defined for DB2 and Oracle databases only. Identity columns can be defined for DB2 and Microsoft SQL Server. If the attribute does not require a unique ID, do not include this parameter in the application-specific information. |
Example of FixedChar parameter in the business object .xsd file
<element name="primaryKey"> <annotation> <appinfo source="WBI"> <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:ColumnName>pkey</jdbcasi:ColumnName> <jdbcasi:PrimaryKey>true</jdbcasi:PrimaryKey> <jdbcasi:FixedChar>true</jdbcasi:FixedChar> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> <simpleType> <restriction base="string"> <maxLength value="10"/> </restriction> </simpleType> </element>
Last updated: Thu Mar 23 13:24:30 2006
(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)