Generating business object definitions as content

As discussed in Business object definitions, a business object definition represents a template for data that can be treated as a collective unit. The purpose of an ODA is to generate business object definitions for objects in a data source. For an ODA to generate business-object-definition content, its ODA class must implement the IGeneratesBoDefs interface.

Note:
Because an ODA must support generation of business object definitions, its ODA class must implement the IGeneratesBoDefs interface.

Table 37 lists the methods that the ODA class must define to implement the IGeneratesBoDefs interface.

Table 37. Methods in the IGeneratesBoDefs interface

Method IGeneratesBoDefs method Description
Source-node-generation method getTreeNodes() Iteratively performs the following:
  • Discover source nodes for objects within the data source.
  • Construct an array of tree nodes that represents the source-node hierarchy.
  • Return an array of tree nodes to Business Object Wizard, which displays them to users in the Select Source dialog box.
Content-generation method generateBoDefs() Generates the business object definitions for the user-selected source data, writing them to ODA memory
Content-retrieval method getBoDefs() Retrieves either a specified business object definition or all business object definitions from ODA memory
Note:
In addition to the methods in Table 37, IGeneratesBoDefs also includes the getContentProtocol() method to specify the content protocol that the ODA supports for business-object-definition generation. For more information, see Choosing the ODA content protocol.

With the IGeneratesBoDefs interface implemented, Business Object Wizard invokes the methods shown in Table 38 to obtain source nodes, as well as generate and retrieve content.

Table 38. Business Object Wizard and IGeneratesBoDefs methods

Step in Business Object Wizard IGeneratesBoDefs method For more information
Step 3: Select Source getTreeNodes() Generating source nodes
Step 5: Generating Business Objects generateBoDefs() Generating business object definitions
Step 5: Generating Business Objects getBoDefs() Providing access to generated business object definitions

The following sections discuss the implementation of each of the methods in Table 38.

Copyright IBM Corp. 1997, 2003