Implementation Guide for Oracle Self-Service E-Billing > Using the Reporting Engine > Core Reporting Features >

Object Data Source


Because you might not have access to the Oracle Self-Service E-Billing database, the Reporting Engine provides an API to get back a list of Objects, which can be presented in a table with paging or sorting. The Reporting Engine offers an Object data source to provide that feature.

The object data source is defined as:

<dataSource id="ds1" uri="object:reportList">
<columns>
<column id="id" type="java.lang.String"/>
<column id="name" type="java.lang.String"/>
</columns>
</dataSource>

This example states that there is an object called reportList in ReportContext, and you must put that object into ReportContext before calling IReportActionHelper. This object can either be a List (java.util.List), List of objects, or a List of JavaBean Objects. If the object is a List of List of objects, then it is assumed that the objects in the inner list are basic Java objects, such as String or Integer. The objects must also match the types defined in the dataSource column.

Usually, the object is a List of JavaBean objects. For example, as shown in the example XML, reportList is a List of IReportConfig objects. (For more information about APIs, see the Oracle Self-Service E-Billing Javadoc as described in Accessing Oracle Self-Service E-Billing Javadoc.) The Reporting Engine uses reflection to get the property values of the JavaBeans, whose property names match the column IDs defined in the example XML, and converts this List of JavaBeans into a List of Lists of JavaBean property objects (more precisely, into a IReportList of IReportRow objects). It is also assumed that the JavaBean properties are basic Java types. In the example, for each IReportConfig object in the list, the report engine calls IReportConfig.getId() and IReportConfig.getName(), and converts the List of IReportConfig objects into an IReportList object. Each element in IReportList is an IReportRow object. Each IReportRow includes two elements, the report IDs and the report names.

Then define the rest of the report XML, including transformers, as usual.

The object data source enables the Reporting Engine to connect to other data sources currently not directly supported by the Reporting Engine. For example, you might have a CORBA interface that retrieves financial data from a legacy system. You can still use the report engine to present the data, as long as you can convert the data into a List of Lists of objects.

Implementation Guide for Oracle Self-Service E-Billing Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices.