ODA extension overview
BIRT uses the Eclipse Data Tools Platform (DTP) open data access (ODA) API to build a driver that connects to a data source and retrieves data for a report. This API defines interfaces and classes that manage the following tasks:
*Connecting to a data source
*Preparing and executing a query
*Handling data and metadata in a result set
*Mapping between the object representation of data and the data source
Eclipse DTP also provides tools and support for SQL development, locales, logging, and other special types of processing. For more information about the Eclipse DTP project, see http://www.eclipse.org/datatools.
The ODA framework is a key component of the DTP. ODA presents the Java developer with a robust architecture to extend the capabilities of BIRT by being able to report on custom data sources. The framework provides new project wizards to create plug-in projects for ODA run-time and designer extensions. The generated plug-in projects include class templates and default implementation. These plug‑in projects support expediting the development of customized ODA data source extensions.
This section shows how to develop an ODA extension using examples that extend the org.eclipse.datatools.connectivity.oda.dataSource extension point to provide access to the following data sources:
*CSV file
Uses the new DTP ODA wizards to create a plug-in project that accesses a CSV data source. DTP ODA interfaces are similar to JDBC interfaces with extensions that support retrieving data from relational and non‑relational database sources.
*Relational database
Uses Hibernate Core for Java, an object-oriented software system for generating SQL and handling JDBC result sets. Hibernate Query Language (HQL) provides a SQL-transparent extension that makes the DTP ODA extension portable to all relational databases. Hibernate also supports developing a query in the native SQL dialect of a database.
Hibernate is free, open-source software licensed under the GNU Lesser General Public License (LGPL). For more information about Hibernate, see http://www.hibernate.org/.
These examples can be found in the Third Edition (published 2011):
http://www.actuate.com/birt/contributions