The adapter uses the RetrieveAll operation to retrieve an array
of business objects from the database. The process differs depending on whether
the RetrieveAll operation is for database table business objects or for user-specified
SQL business objects.
For database table business objects
All
of the key and non-key attributes populated in the incoming business object
determine the selection criteria. The adapter may retrieve multiple rows for
the top-level business object from the database, depending on the attributes
selected. If no attributes are populated in the incoming business object,
all the rows are retrieved from the respective table in the database.
The adapter performs the following steps to retrieve an array of business
objects:
- For each of the rows retrieved from the database, the adapter constructs
a top-level business graph and creates a container of business graphs using
all of the retrieved rows. The name of the container business object is BOName + ContainerBG.
- The adapter retrieves each of the business graphs in the container using
the Retrieve operation.
Figure 1. Structure of the business object returned
in a RetrieveAll operation
The following errors can result from a RetrieveAll operation:
For user-specified SQL business objects
Business objects that are created for user-specified
SQL statements also support the RetrieveAll operation. When the enterprise
service discovery (ESD) wizard generates the query business object for the
user-specified SQL statement, the adapter runs the SQL SELECT statement, and
returns data to the database in the structure shown in the following figure.
Figure 2. User-specified SQL business objects
To process the query business object generated by ESD for the user-specified
SELECT statement, the adapter:
- Obtains the SELECT SQL statement from the query business object.
- Checks whether a dynamic where clause is specified in the query business
object.
- If there is a dynamic where clause, the adapter replaces the default where
clause in the SELECT statement with the dynamic one.
- If there is no dynamic where clause, the adapter replaces parameters in
the SELECT statement with the corresponding values specified in the query
business object.
- Runs the SELECT statement
- Obtains the result set that is returned and populates the query business
object values with the data returned from the database, creating a container
business object with the structure shown in the previous figure.
- Does a deep retrieve of each top-level query business object in the container,
depending on whether any child business objects are defined for the query
business object.
Note: Query business objects can be only top-level business
objects. A query business object cannot have child query business objects.
Terms of use |
Last updated: Tue 12 Dec 2006 03:32:39
(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)