Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.dghda.kent.reports
Class BaseJDBCReport  view BaseJDBCReport download BaseJDBCReport.java

java.lang.Object
  extended bycom.dghda.module.BaseModule
      extended bycom.dghda.kent.BaseKentModule
          extended bycom.dghda.kent.reports.FixedTemplateReport
              extended bycom.dghda.kent.reports.BaseJDBCReport
All Implemented Interfaces:
com.dghda.kent.KentModule, com.dghda.module.Module, com.dghda.kent.Report
Direct Known Subclasses:
SimpleSQLReport

public abstract class BaseJDBCReport
extends FixedTemplateReport
implements com.dghda.kent.Report

A base class to simplify writing reports which access a database through JDBC.


Nested Class Summary
 
Nested classes inherited from class com.dghda.module.Module
com.dghda.module.Module.ModuleVersion
 
Field Summary
private  java.util.LinkedList m_Queries
           
 
Fields inherited from class com.dghda.kent.reports.FixedTemplateReport
 
Fields inherited from class com.dghda.kent.BaseKentModule
 
Fields inherited from class com.dghda.module.BaseModule
 
Fields inherited from interface com.dghda.kent.KentModule
ACTION_ID, AUTHENTICATED_USER, FORMAT_ID, REPORT_ID
 
Constructor Summary
BaseJDBCReport(java.lang.String id, java.lang.String shortName, java.lang.String description, com.dghda.module.Module.ModuleVersion version, com.dghda.kent.ReportEngine engine, java.io.InputStream input)
          Creates a new report object loaded by the given report engine.
 
Method Summary
 void addQuery(SQLQueryMapping query)
          Adds the given query to the report.
protected  com.dghda.kent.ReportData createReportData(java.util.Properties config)
          Creates a report data document containing data sets generated by the report's queries.
 java.lang.String getConfigurationOptions(java.util.Properties config)
          The base JDBC report implementation has no configuration options.
 java.lang.String getReportData(java.util.Properties config)
          Creates a report data document using the SQL query.
 
Methods inherited from class com.dghda.kent.reports.FixedTemplateReport
getReportTemplate, load
 
Methods inherited from class com.dghda.kent.BaseKentModule
getReportEngine
 
Methods inherited from class com.dghda.module.BaseModule
getDescription, getID, getName, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.dghda.kent.Report
getReportTemplate
 
Methods inherited from interface com.dghda.module.Module
getDescription, getID, getName, getVersion
 

Field Detail

m_Queries

private java.util.LinkedList m_Queries
Constructor Detail

BaseJDBCReport

public BaseJDBCReport(java.lang.String id,
                      java.lang.String shortName,
                      java.lang.String description,
                      com.dghda.module.Module.ModuleVersion version,
                      com.dghda.kent.ReportEngine engine,
                      java.io.InputStream input)
               throws java.io.IOException
Creates a new report object loaded by the given report engine.

Method Detail

getConfigurationOptions

public java.lang.String getConfigurationOptions(java.util.Properties config)
The base JDBC report implementation has no configuration options. If configuration options are required this method should be overriden.

Specified by:
getConfigurationOptions in interface com.dghda.kent.KentModule

addQuery

public void addQuery(SQLQueryMapping query)
Adds the given query to the report.


getReportData

public java.lang.String getReportData(java.util.Properties config)
                               throws com.dghda.kent.ReportingException
Creates a report data document using the SQL query.

Specified by:
getReportData in interface com.dghda.kent.Report

createReportData

protected com.dghda.kent.ReportData createReportData(java.util.Properties config)
                                              throws java.sql.SQLException
Creates a report data document containing data sets generated by the report's queries. To implement more complex behaviour, override this method and call it from the sub-class.