Interface Report<T,R,P>

Type Parameters:
T - the report type
R - the report result type
P - 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

    Fields
    Modifier and Type
    Field
    Description
    static final PropertyValue<Boolean>
    Specifies whether to cache reports when loaded from disk/network, this prevents "hot deploy" of reports.
    Value type: Boolean
    Default value: true
    static final PropertyValue<String>
    The report path used for file based report generation.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    Clears the report cache, if caching is not enabled calling this method has no effect
    fill(Connection connection, P parameters)
    Loads and fills the report using the given database connection
    static String
    fullReportPath(String reportPath)
    Returns a full report path, combined from the report location specified by REPORT_PATH and the given report path.
    Loads the report this report wrapper is based on.
    static String
     
  • Field Details

    • REPORT_PATH

      static final PropertyValue<String> REPORT_PATH
      The report path used for file based report generation.
    • CACHE_REPORTS

      static final PropertyValue<Boolean> 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

      R fill(Connection connection, P parameters) throws ReportException
      Loads and fills the report using the given database connection
      Parameters:
      connection - the connection to use for the report generation
      parameters - the report parameters, if any
      Returns:
      a filled report ready for display
      Throws:
      ReportException - in case of an exception
    • load

      T load() throws ReportException
      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

      static String reportPath()
      Returns:
      the value associated with REPORT_PATH
      Throws:
      IllegalStateException - in case it is not specified
    • fullReportPath

      static String fullReportPath(String reportPath)
      Returns a full report path, combined from the report location specified by REPORT_PATH and the given report path.
      Parameters:
      reportPath - the report path relative to REPORT_PATH.
      Returns:
      a full report path
      Throws:
      IllegalStateException - in case REPORT_PATH is not specified