- java.lang.Object
-
- is.codion.common.db.report.AbstractReport<T,R,P>
-
-
Field Summary
Fields Modifier and Type Field Description protected String
reportPath
-
Fields inherited from interface is.codion.common.db.report.Report
CACHE_REPORTS, REPORT_PATH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractReport(String reportPath, boolean cacheReport)
Instantiates a new AbstractReport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clears the report cache, if caching is not enabled calling this method has no effectboolean
equals(Object obj)
protected String
fullReportPath()
This default implementation usesReport.fullReportPath(String)
.int
hashCode()
boolean
isCached()
protected T
loadAndCacheReport()
Returns the underlying report, either from the cache, if enabled or viaReport.loadReport()
.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface is.codion.common.db.report.Report
fillReport, loadReport
-
-
-
-
Field Detail
-
reportPath
protected final String reportPath
-
-
Constructor Detail
-
AbstractReport
protected AbstractReport(String reportPath, boolean cacheReport)
Instantiates a new AbstractReport.- Parameters:
reportPath
- the report path, relative to the central report pathReport.REPORT_PATH
.cacheReport
- true if the report should be cached when loaded
-
-
Method Detail
-
isCached
public final boolean isCached()
-
clearCache
public final void clearCache()
Description copied from interface:Report
Clears the report cache, if caching is not enabled calling this method has no effect- Specified by:
clearCache
in interfaceReport<T,R,P>
-
fullReportPath
protected String fullReportPath()
This default implementation usesReport.fullReportPath(String)
.- Returns:
- a unique path for this report
-
loadAndCacheReport
protected final T loadAndCacheReport() throws ReportException
Returns the underlying report, either from the cache, if enabled or viaReport.loadReport()
.- Returns:
- the report
- Throws:
ReportException
- in case of an exception- See Also:
Report.CACHE_REPORTS
-
-