Package | Description |
---|---|
com.ibm.ier.report.db |
This package contains the interfaces related to database connections for the report.
|
com.ibm.ier.report.db.impl |
This package contains the implementation classes for the public interfaces of the database connections for the report.
|
com.ibm.ier.report.service |
This package contains the classes related to the report services.
|
IBM Enterprise Records Report Engine Java API Documentation
The IBM Enterprise Records (IER) Report Engine Java API provides interfaces and classes that allow programmatic generation of the data for IER Reporting. It depends on the IBM Enterprise Records Java API for executing the queries defined in a report definition document on a repository to generate the data for the reports.
To get started using the Report Engine Java API, the following steps are typically performed:- Create a Map object to define the connection context to a database.
-
Establish a database descriptor
DBDescriptor
instance that defines the context for connecting to a database. -
Establish a report engine service
Report_Services
instance. - Call the generateReportData method on the Report_Services object to execute the query and insert the results to the database.
The following code snippet provides an example of the above steps:
// ------ First create a Map object to define the connection context to a database ------ MapdbContext = new HashMap (); dbContext.put(DBDescriptor.DB_Server, "db2server"); dbContext.put(DBDescriptor.DB_Port, "50000"); dbContext.put(DBDescriptor.DB_Database, "REPORTS"); dbContext.put(DBDescriptor.DB_Username, "db2admin"); dbContext.put(DBDescriptor.DB_Password, "db2Admin"); dbContext.put(DBDescriptor.DB_Schema, "IER_REPORT"); // ------ Acquire a DB2 database descriptor instance ------ DBDescriptor dbDescriptor = new JDBC_DBDescriptor(DBType.DB2, dbContext); // Verify the database connection. This call is optional. dbDescriptor.verify(); // ------ Acquire a report engine service instance ------ Report_Services rptServices = new Report_Services(dbDescriptor); // ------ Call generateReportData method on the Report_Services object to execute the query and insert the results to the database ------ // The following strings set the values for the parameters of rptServices.generateReportData method. String rptDefinitionIdent = "{27739AE6-FBE8-4344-AD11-D617BF16B6BD}"; // The GUID of a report definition document. String rptJobId = "{89BC8D96-A558-48C9-B313-F45348112B05}"; // The following strings set the values for the query parameters of the report definition. Map rptParams = new HashMap (); rptParams.add("user_name", "p8admin"); rptParams.add("start_date", "2012-04-01"); rptParams.add("end_date", "2012-06-01"); List entityTypeList = new ArrayList (3); entityTypeList.add("RecordCategory"); entityTypeList.add("RecordFolder"); entityTypeList.add("Record"); rptParams.add("rm_entity_type", entityTypeList); int totalRowsAdded = rptServices.generateReportData(rptDefinitionIdent, FPRepos, rptParams, rptJobId);
© Copyright IBM Corp. 2012, 2013. All Rights Reserved.