IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > JDBC > Reference > Business object information

Attribute application-specific information

Application-specific information (ASI) for business object attributes differs depending on whether the attribute is a simple attribute or is an attribute that represents a child or an array of child business objects. The application-specific information for an attribute that represents a child differs depending on whether the parent-child relationship is stored in the child or in the parent.


Application-specific information for simple attributes

For simple attributes, the format for application-specific information consists of a number of parameters and their values. The only parameter that is required for a simple attribute is the column name. The application-specific information for simple attributes is described in Table 1.

Application-specific information for simple attributes
Parameter Type Description Default value Valid Value Usage
BLOB Boolean Indicates whether the database column that corresponds to this attribute has the BLOB data type. While displaying BLOB data, the adapter displays the number of bytes as a hexadecimal value. The attribute type is hexBinary.

If set to True, the column data type is BLOB.

None True, False
<jdbcasi:BLOB>true</jdbcasi:BLOB>
ByteArray Boolean Specifies whether the column is a binary data type. If True, the adapter reads and writes binary data to the database and sends that data as a string to the application server. The adapter sets binary data on the business object. The attribute type is hexBinary. False True, False
<jdbcasi:ByteArray>false</jdbcasi:ByteArray>
ChildBOType String If the attribute is a complex data type, use this application-specific information to specify the actual type:

  • Struct

  • Array
  • ResultSet

None Struct, Array, ResultSet
<jdbcasi:ChildBOType>Array</jdbcasi:ChildBOType>
ChildBOTypeName String When the value of the ChildBOType application-specific information is either Struct or Array, this parameter represents the name of the user-defined type. This value is case-sensitive.   <user-defined struct or array type name> There is a struct type called CUSTOMER_STRUCT_TYPE in Oracle:
<jdbcasi:ChildBOTypeName>CUSTOMER_STRUCT_TYPE</jdbcasi:ChildBOTypeName>
CLOB Boolean Indicates whether the database column that corresponds to this attribute has the CLOB data type. This value applies only to attributes of type String.

If True, the column data type is CLOB.

The CLOB attribute has a String type whose length is used to define the length of the CLOB.

None True, False
<jdbcasi:CLOB>True</jdbcasi:CLOB>
ColumnName String The name of the database column corresponding to this attribute.

is the only required parameter.

None <column name>
<jdbcasi:ColumnName>pkey</jdbcasi:ColumnName>
CopyAttribute String A user-specified value that refers to another attribute name from within the same business object or parent business object.

If the value set in the application-specific information refers to the name of another attribute within the same business object, then the adapter uses the value of the other attribute to set the value of this attribute (on which application-specific information is defined) before it adds the business object to the database during a Create operation.

For example, if you want the contact column of a new row in the table to contain the same value as the email column, set the CopyAttribute parameter of the contact attribute to email.

value cannot reference an attribute in a child business object, but it can reference an attribute in the parent business object by preceding the name with two .

For example, you can reference the ccode attribute in a parent business object as ..ccode.

If you do not include this parameter in the application-specific information, the adapter uses the value of the current attribute without copying the value from another attribute.

None <attribute name> or ..<attribute name>
<jdbcasi:CopyAttribute>contact</jdbcasi:CopyAttribute>
or
<jdbcasi:CopyAttribute>..code</jdbcasi:CopyAttribute>
DateType String Specifies that the corresponding element is a date, time, or time stamp. Specify one of the following values:

  • Date
  • Time
  • Timestamp

When setting the value of an attribute of the DateType type, use the following formats:

  • For Date, use yyyy-MM-dd

  • For Time, use hh:mm:ss

  • For Timestamp, use yyyy-MM-dd hh:mm:ss.fffffffff

The java.sql.Timestamp.valueOf () method converts the JDBC timestamp format to the Timestamp value and inserts this value into the database. The java.sql.Timestamp.toString() method converts the Timestamp value in the database to string. The adapter uses the Timestamp value present in the database. To learn more about the Timestamp method, see the Sun website at http://java.sun.com/j2se/1.5.0/docs/api/ and search for Timestamp.

None Date, Time, Timestamp
<jdbcasi:DateType>Timestamp</jdbcasi:DateType>
DateFormat String Allows you to customize the format of the Date, Time and Timestamp data types. The adapter uses this parameter when the SQL Date, Time or Timestamp data type has to be converted to string and the other way around. None Date, Time, Timestamp
<jdbcasi:DateFormat>Time</jdbcasi:DateFormat>
DecimalScale Int Specifies the scale of decimal data type.

For example, unscaledVal × 10 -scale

None <integer value>
<jdbcasi:Decimal>3</jdbcasi:Decimal>
Indicates that the original value is 6.34444 and the modified value is 6.344.
Dummy Boolean Indicates a dummy column. If True, the Dummy column value is not updated or inserted into the database. Use this application-specific information when you want to configure multiple ForeignKey values on one column. None True, False
<jdbcasi:Dummy>True</jdbcasi:Dummy>
FixedChar Boolean Specifies whether the attribute is of fixed length when the columns in the table are of type CHAR, not VARCHAR.

For example, when set to true, 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.

This parameter must be updated manually in the XSD file in the business object. Open the business object by using an XML or Text editor to edit the XSD file and make the following two changes:

  1. Remove the type="string" added by default to the <element> tag for the object attribute.

  2. Add a new <simpletype> section before the </element> as shown in this example:
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="10"/>
    </xsd:restriction>
    </xsd:simpleType>
Save the object definition, and ensure that no validation errors occur in the XSD file after it has been updated.

See the section "Example of a FixedChar parameter in the business object XSD file" following this table.

false True, False
<jdbcasi:FixedChar>True</jdbcasi:FixedChar>
ForeignKey String The value of this property depends on whether the parent and child relationship is stored in the parent business object or in the child.

If the relationship is stored in the parent, the value includes both the type of the child business object and the name of the attribute in the child to be used as the foreign key (Child_BO_name/Child_Property_Name).

If the relationship 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.

None <attribute name> or <childboname>/<childboattributename>
<jdbcasi:ForeignKey>custinfoObj/custCode</jdbcasi:ForeignKey>, <jdbcasi:ForeignKey>custCode</jdbcasi:ForeignKey>
OrderBy String

If a value is specified, the adapter uses the value specified in the ORDER BY clause of the RetrieveAll operation. The adapter retrieves business objects in the order that you have specified. If you do not include this parameter in the application-specific information, the adapter will not specify the retrieval order for the RetrieveAll operation.

None DESC, ASC
<jdbcasi:OrderBy>ASC</jdbcasi:OrderBy>
PrimaryKey Boolean If the column associated with this attribute is a primary key in the corresponding table in the database, the PrimaryKey parameter is set to True. None True, False
<jdbcasi:PrimaryKey>True</jdbcasi:PrimaryKey>
SPParameterType String Specifies the type of stored procedure

Possible values are:

  • IP (input only)
  • OP (output only)
  • IO (input and output)
  • RS (result set)

None IP, OP, IO, RS
<jdbcasi:SPParameterType>IO</jdbcasi:SPParameterType>
UniqueIdentifier (UID) String The adapter uses this parameter to generate the unique ID for the business object. It supports the generation of sequences and identity columns (identity columns are known as serial columns in Informix ). DB2 supports both sequences and identity columns.

Identity columns provide a way for the database to automatically generate a unique numeric value for each row in a table.

Identity columns can be defined for DB2 and Microsoft SQL Server, and serial columns can be defined for Informix.

The format of this parameter is as follows:

UID=AUTO| Sequence_Name

If you run the discovery process against a table in either a DB2 or Microsoft SQL Server database, you must manually set the UID (Unique Identifier) attribute to AUTO, for example, <UID>AUTO</UID>.

The requirement to manually set the UID (Unique Identifier) attribute to AUTO is specific to identity columns in DB2 and Microsoft SQL Server. The requirement does not apply to serial columns in Informix. For Informix, the UID attribute for the serial column is generated automatically and will be either <UID>SERIAL</UID> or <UID>SERIAL8</UID>.

Like identity columns, sequences are also used to automatically generate numeric values. Consult the database documentation for details on how the database uses sequences and identity columns.

For a sequence, set the UID attribute to the name of the sequence. Sequences can be defined for DB2 and Oracle databases.

If the attribute does not require a unique ID, do not include this parameter in the application-specific information.

None AUTO, SERIAL, SERIAL8
<jdbcasi:UID>AUTO</jdbcasi:UID>
XML Boolean If the table column in the database is of XML type, the XML parameter is set to True. None True, False
<jdbcasi:XML>True</jdbcasi:XML>
UpdateAllCriteria String User-defined query criteria for UpdateAll operation. None <embedded SQL>
<jdbcasi:UpdateAllCriteria>where company.id = (select company.id from company,customer where company.id = customer.pkey and customer.pkey = :customerobj:pkey)</jdbcasi:UpdateAllCriteria>
RetrieveAllCriteria String User-defined query criteria for RetrieveAll operation. None <embedded SQL>
<jdbcasi:UpdateAllCriteria>where company.id = (select company.id from company,customer where company.id = customer.pkey and customer.pkey = :customerobj:pkey)</jdbcasi:RetrieveAllCriteria>
DeleteAllCriteria String User-defined query criteria for DeleteAll operation. None <embedded SQL>
<jdbcasi:DeleteAllCriteria>where company.id = (select company.id from company,customer where company.id = customer.pkey and customer.pkey = :customerobj:pkey)</jdbcasi:DeleteAllCriteria>
ExistsCriteria String User-defined query criteria for Exists operation. None <embedded SQL>
<jdbcasi:ExistsCriteria>where company.id = (select company.id from company,customer where company.id= customer.pkey and customer.pkey = :customerobj:pkey)</jdbcasi:ExistsCriteria>

The format of attribute application-specific information is shown in the following example section of an XSD file:


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>
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
            <xsd:maxLength value="10"/>
            </xsd:restriction>
         </xsd: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>


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>
<xsd:simpleType>
        <xsd:restriction base="xsd:string">
                <xsd:maxLength value="10"/>
        </xsd:restriction>
</xsd:simpleType>
</element>


Application-specific information for attributes that refer to child business object

Two application-specific information parameters are used for attributes that refer to child business objects (complex, as opposed to simple, attributes). When you set this application-specific information, specify the parameters listed in Table 2.

Application-specific information for attributes of type child business object
Parameter Type Description Default value Valid Value Usage
KeepRelationship Boolean If True, this parameter prevents a child business object from being deleted during an Update operation. None True, False
<jdbcasi:KeepRelationship>True</jdbcasi:KeepRelationship>
Ownership Boolean This parameter specifies that a child business object is owned by the parent. If True, Create, Update, and Delete operations on the child business object are allowed. If False, no 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. None True, False
<jdbcasi:Ownership>True</jdbcasi:Ownership>


Example of ownership in the business object XSD file

<element minOccurs="0" name="addressObj" type="bons0:OutboundRtasserAddress"
maxOccurs="unbounded"> <annotation> <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi=
"http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:Ownership>true</jdbcasi:Ownership> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> </element> <element minOccurs="0" name="custinfoObj" type="bons1:OutboundRtasserCustinfo"
maxOccurs="1"> <annotation> <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi=
"http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"> <jdbcasi:Ownership>false</jdbcasi:Ownership> </jdbcasi:JDBCAttributeTypeMetadata> </appinfo> </annotation> </element>


Another example of an XSD file for single- and multiple-cardinality child business objects

An example of the XSD definition file for single- and multiple-cardinality child business objects is provided here. The element custInfoObj is a single-cardinality child business object, and addressObj is a multiple-cardinality child business object.

<element name="addressObj" minOccurs="1" type="Address:Address" 
maxOccurs="unbounded"> 
                        <annotation>
                        <appinfo source="WBI">
                        <pasi:JDBCAttributeTypeMetadata xmlns:pasi=
"urn:app:jdbc:asi">
                                <pasi:Ownership>true</pasi:Ownership>
                        </pasi:JDBCAttributeTypeMetadata>
                        </appinfo>
                        </annotation>
                        </element>
                        <element name="custInfoObj" minOccurs="0" type=
"CustInfo:CustInfo" maxOccurs="1"> 
                        <annotation>
                        <appinfo source="WBI">
                        <pasi:JDBCAttributeTypeMetadata xmlns:pasi=
"urn:app:jdbc:asi">
                                <pasi:Ownership>false</pasi:Ownership>
                        </pasi:JDBCAttributeTypeMetadata>
                        </appinfo>
                        </annotation>
                        </element>        


Application-specific information for operations

The adapter uses application-specific information at the operation level to perform operations, such as those retrieve and update information in the database. The adapter retrieves and updates database tables using SQL queries, stored procedures, or stored functions, as specified in the business objects.

If you choose to add stored procedures or stored functions to the business objects, set the operation application-specific information (ASI) as specified in Table 3.

Operation application-specific information
Operation ASI for StoredProcedure parameters element Set by wizard Description
Parameters Yes Lists the stored procedure parameters.
PropertyName Yes Set to the name of the business object attribute that you select.
ResultSet No If the stored procedure returns a result set, set this parameter to True in the business object definition.
ReturnValue Yes If the stored procedure has a return value, this parameter contains one of these values:

  • The string RS. This value indicates that the procedure returns a result set, which is used to create the multiple-cardinality container corresponding to this business object.

  • The name of a business object attribute. This value indicates that procedure returns the value that is to be assigned to that particular attribute in the business object at run time.

    If the attribute is another child business object, the adapter returns an error.

StoredProcedure Yes Set to the stored procedure name.
StoredProcedureType Yes You select from a list of types.

For information about valid stored procedure types, see Stored procedure type.

For information about valid stored procedure types, see Stored procedure type.

Type Yes Set to the type of the stored procedure parameter. Possible values are:

  • IP (input only)
  • OP (output only)
  • IO (input and output)
  • RS (result set)

Business object information


Related tasks:

Adding external software dependencies

Discovering database objects for outbound processing

Discovering database objects for inbound processing


Related reference:

Business object attributes

Solutions to common problems