Interface Report<T,P extends @Nullable Object,R>

Type Parameters:
T - the report type
P - the report parameters type, nullable where the report may be filled without parameters
R - the report result type
All Known Subinterfaces:
JRReport<R>
All Known Implementing Classes:
AbstractReport

public interface Report<T,P extends @Nullable Object,R>
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.
      • Value type: String
      • Default value: null
    • 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)
      Loads and fills the report using the given database connection.

      The connection is the JDBC connection of the entity connection filling the report, on the server when the entity connection is remote. Filling runs within its transaction handling, inside a transaction when one is open, the connection committed afterwards when none is, so the report must not commit, roll back or close it.

      A report based on entities rather than on SQL is filled in the client instead, from the entities it has, selecting any more via the entity connection as it fills. Where the client can not host the reporting engine, a database function, which receives the entity connection, can fill and export it on the server, see FunctionType.

      Parameters:
      connection - the connection to use for the report generation
      parameters - the report parameters
      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

      static String reportPath()
      Returns:
      the value associated with REPORT_PATH
      Throws:
      NoSuchElementException - 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:
      NoSuchElementException - in case REPORT_PATH is not specified