public abstract class AbstractReportService<T> extends Object implements ReportService
JasperReportService.
Any other third party reporting framework can be supported by implementing a class that
extends from AbstractReportService and then configuring that class in the global bean definitions xml.| Constructor and Description |
|---|
AbstractReportService(int templateCacheMinSize,
int templateCacheMaxSize) |
| Modifier and Type | Method and Description |
|---|---|
ReportOutput |
createReport(ReportRequest reportInput) |
protected abstract ReportOutput |
createReportFromHql(ReportRequest reportInput)
Creates report using a template that uses HQL for fetching data
|
protected abstract ReportOutput |
createReportFromJavaBean(ReportRequest reportInput)
Creates a report using given report input where the report data source is java beans
|
protected ReportOutput |
createReportFromSql(ReportRequest reportInput)
Creates report using a JDBC connection
|
protected abstract ReportOutput |
createReportFromSql(ReportRequest reportInput,
Connection connection)
Creates report for given report template, format, connection and parameters
|
protected T |
getTemplate(String templateName)
Returns the Report Template object for given template path.
|
protected abstract String |
getTemplateExtension() |
boolean |
isValidTemplate(String templateName) |
protected abstract T |
loadTemplate(InputStream templateInputStream) |
public AbstractReportService(int templateCacheMinSize,
int templateCacheMaxSize)
templateCacheMinSize - Minimum size of template cachetemplateCacheMaxSize - Maximum size of template cacheprotected abstract ReportOutput createReportFromJavaBean(ReportRequest reportInput)
reportInput - The report inputprotected abstract ReportOutput createReportFromSql(ReportRequest reportInput, Connection connection)
reportInput - Report Input objectconnection - JDBC connectionprotected abstract ReportOutput createReportFromHql(ReportRequest reportInput)
reportInput - The report inputprotected abstract String getTemplateExtension()
protected abstract T loadTemplate(InputStream templateInputStream)
templateInputStream - Input stream from which the report template is to be loadedpublic ReportOutput createReport(ReportRequest reportInput)
createReport in interface ReportServiceprotected ReportOutput createReportFromSql(ReportRequest reportInput)
reportInput - The report inputprotected T getTemplate(String templateName)
templateName - Name of the Report template (without extension)public boolean isValidTemplate(String templateName)
isValidTemplate in interface ReportServiceCopyright © 2015–2017 eGovernments Foundation. All rights reserved.