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

Business object attributes

Business object attributes define the content of a business object and are built from the list of columns in the database object. Each attribute has a name, type, cardinality, and several other properties. The external service wizard sets the attribute name to the name of the column. The adapter adds the attribute cardinality, type, and application-specific information.

A business object is a container for the data specified in the attributes. The structure of the data in the database is defined by the business object, but data in the database is in the business object attributes.

Table 1 lists the properties of a business object attribute and describes their interpretation and settings.

Attribute properties
Properties Interpretation and settings
Cardinality An integer specifying the cardinality of a business object. Each business object attribute that represents a child or an array of child business objects has the value of single (1) or multiple (an unbounded integer) cardinality.

In both single- and multiple-cardinality relationships, the relationship between the parent and child business objects is described by the application-specific information of the key attribute in the business object storing the relationship.

Foreign Key When arrays of child business objects whose cardinality is n are retrieved, foreign keys are used in the WHERE clause of the SELECT statements.

The RetrieveAll operation overrides the use of keys and foreign keys.

The adapter does not support specifying an attribute that represents a child business object as a foreign key.

Name This property represents the unique name of the attribute if it is a simple attribute, or the name of the business object if it is a child business object.

MinOccurs
MaxOccurs

If the column is not a primary key and is not nullable, the MinOccurs and MaxOccurs attributes are required, and their values are set to 1.
Primary Key Indicates whether this attribute is a primary key. At least, one simple attribute in each business object must be specified as the primary key.

If the primary key property is set to true for a simple attribute, the adapter adds that attribute to the WHERE clause of the SELECT statement and SQL UPDATE statements that it generates while processing the business object. The RetrieveAll operation overrides the use of primary and foreign keys.

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

Required Specifies whether an attribute must contain a value. If this property is set to true for a container whose cardinality is single (1), then the adapter requires that the parent business object contain a child business object for this attribute. Business objects that are passed to the adapter for Create, Update, and Delete operations must also contain a child business object. Cardinality is single (1) for simple attributes and multiple (n) for container attributes. The Create operation fails if a business object does not have a valid value or a default value for the required attribute. The operation also fails if no data is available for this object on retrieval from the database.
Type For simple attributes, this property specifies the type of the attribute, such as Integer, String, Date, Timestamp, Boolean, Double, or Float. The supported types for simple attributes and their mapping to the JDBC type of a database object are described in Table 2.

For attributes that specify a child business object, this property specifies the name of the business object.

The type of each database object, returned as the JDBC metadata, maps to the business object attribute types as listed in Table 2. Only the JDBC types listed are supported by the adapter. Any columns with types that are not listed are not added to the business object. An informational message is produced explaining the problem, for example, The column named xxxx in the table named yyyy is not of a supported type and will not be added to the business object.

JDBC metadata column type and business object attribute types
JDBC metadata column type Business object attribute type
BIT Boolean

CHAR
LONGVARCHAR
VARCHAR

String
NUMERIC Decimal
Int

INTEGER
SMALLINT
TINYINT

Int
BIGINT Long
Int

TIME

String
Time

TIMESTAMP

String
DateTime

DATE

String
Date
Datetime
DECIMAL Decimal
DOUBLE
FLOAT
Double
REAL Float
BLOB hexBinary
CLOB String
BINARY
VARBINARY
LONGBINARY
hexBinary
NCHAR
NVARCHAR
NTEXT
String
TEXT String
RAW hexBinary
MONEY
SMALLMONEY
Decimal
STRUCT or ARRAY The adapter processes these data types as child business objects of the table or query business objects.

The adapter supports complex types for Oracle table and query business objects only. If the table contains any complex data type such as an array, structure, nested structure, or table, the type name and the sub attribute details are also automatically discovered and displayed.

The adapter treats an empty complex column as null irrespective of setting it to null or unset.

XML String

For Oracle, the following additional libraries are required to handle the XML data type in the runtime environment:

xdb.jar
xmlparserv2.jar

In addition, if you are using a JNDI data source to connect to the database, ensure that you add xdb.jar and xmlparserv2.jar to the class path when you create the data source.

The XML type is supported in table, query, stored procedure, and batch query business objects.

Example of an XML content:

<customer>
<fname>John</fname>
<lname>Smith</lname>
</customer>

Business object information


Related concepts:

Business object hierarchies

Business objects

Create operation

Update operation

Attribute application-specific information


Related tasks:

Selecting and configuring tables, views, and synonyms or nicknames for inbound processing

Selecting and configuring tables, views, and synonyms or nicknames for outbound processing

Selecting and configuring query business objects

Selecting and configuring tables, views, and synonyms or nicknames for outbound processing

Selecting and configuring query business objects

Adding external software dependencies