- Type Parameters:
T- the report typeR- the report result typeP- the report parameters type
- All Known Subinterfaces:
JRReport
- All Known Implementing Classes:
AbstractReport
public interface Report<T,R,P>
A wrapper for a report
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<Boolean> Specifies whether to cache reports when loaded from disk/network, this prevents "hot deploy" of reports Value type: Boolean Default value: truestatic final PropertyValue<String> The report path used for file based report generation. -
Method Summary
Modifier and TypeMethodDescriptionbooleancached()voidClears the report cache, if caching is not enabled calling this method has no effectfill(Connection connection, @Nullable P parameters) Loads and fills the report using the given database connectionstatic StringfullReportPath(String reportPath) Returns a full report path, combined from the report location specified byREPORT_PATHand the given report path.load()Loads the report this report wrapper is based on.static String
-
Field Details
-
REPORT_PATH
The report path used for file based report generation. -
CACHE_REPORTS
Specifies whether to cache reports when loaded from disk/network, this prevents "hot deploy" of reports- Value type: Boolean
- Default value: true
-
-
Method Details
-
fill
Loads and fills the report using the given database connection- Parameters:
connection- the connection to use for the report generationparameters- the report parameters, if any- Returns:
- a filled report ready for display
- Throws:
ReportException- in case of an exception
-
load
T load()Loads the report this report wrapper is based on.- Returns:
- a loaded report object
- Throws:
ReportException- in case of an exception
-
cached
boolean cached()- Returns:
- true if this report has been cached
-
clearCache
void clearCache()Clears the report cache, if caching is not enabled calling this method has no effect -
reportPath
- Returns:
- the value associated with
REPORT_PATH - Throws:
IllegalStateException- in case it is not specified
-
fullReportPath
Returns a full report path, combined from the report location specified byREPORT_PATHand the given report path.- Parameters:
reportPath- the report path relative toREPORT_PATH.- Returns:
- a full report path
- Throws:
IllegalStateException- in caseREPORT_PATHis not specified
-