org.jminor.common.model.reports
Interface ReportWrapper<R,D>

Type Parameters:
R - the type of the report being wrapped.
D - the type of the report datasource

public interface ReportWrapper<R,D>

A simple wrapper for a report


Method Summary
 ReportResult<R> fillReport(Connection connection)
          Fills the report using the given database connection
 ReportResult<R> fillReport(ReportDataWrapper<D> dataWrapper)
          Fills the report using the given data wrapper
 String getReportName()
           
 

Method Detail

getReportName

String getReportName()
Returns:
the name of the report

fillReport

ReportResult<R> fillReport(Connection connection)
                           throws ReportException
Fills the report using the given database connection

Parameters:
connection - the connection to use for the report generation
Returns:
a filled report ready for display
Throws:
ReportException - in case of an exception

fillReport

ReportResult<R> fillReport(ReportDataWrapper<D> dataWrapper)
                           throws ReportException
Fills the report using the given data wrapper

Parameters:
dataWrapper - the data provider to use for the report generation
Returns:
a filled report ready for display
Throws:
ReportException - in case of an exception