Interface ReportRepository

All Known Implementing Classes:
ReportRepositoryImpl

public interface ReportRepository
Provides unified access to both types of reports: stored in database and defined in code. Loading and modification operations apply registered security constraints.
Application should generally should use this interface to load reports, instead of DataManager.
  • Method Details

    • getAllReports

      Collection<Report> getAllReports()
      Load all known reports. Returned entities aren't guaranteed to have all internal structure loaded, only basic properties. When necessary, reload the entity using reloadForRunning(Report) method.
      Returns:
      list of reports with only basic properties loaded
    • loadList

      List<Report> loadList(ReportLoadContext loadContext)
      Load list of reports, with filtering, pagination and sorting options available. Returned entities aren't guaranteed to have all internal structure loaded, only basic properties. When necessary, reload the entity using reloadForRunning(Report) method.
      Parameters:
      loadContext - context containing filtering, pagination and sorting options
      Returns:
      list of reports with only basic properties loaded
    • getTotalCount

      int getTotalCount(ReportFilter filter)
      Calculate total count of reports that conform to passed filter.
      Parameters:
      filter - object with filter values
      Returns:
      count of suitable reports
    • loadForRunningByCode

      @Nullable Report loadForRunningByCode(String reportCode)
      Load by code a full report object with all details, suitable for passing it to the rendering engine.
      Parameters:
      reportCode - report's unique code
      Returns:
      full report object with all details, or null if no such report
    • existsReportByCode

      boolean existsReportByCode(String code)
      Checks if there are any reports with the given code.
      Parameters:
      code - report code
      Returns:
      true if a report with this code exists, false otherwise
    • loadReportIdByCode

      Optional<UUID> loadReportIdByCode(String code)
      Loads report id by its code.
      Parameters:
      code - report code.
      Returns:
      Optional id for report.
    • existsReportByGroup

      boolean existsReportByGroup(ReportGroup group)
      Checks if any reports are connected to the given group.
      Parameters:
      group - report group
      Returns:
      true if there is a report connected to this group, false otherwise
    • save

      Report save(Report report)
      Saves Report entity to the database.
      Parameters:
      report - report entity instance
      Returns:
      saved instance
    • reloadForRunning

      Report reloadForRunning(Report report)
    • reloadTemplateForRunning

      ReportTemplate reloadTemplateForRunning(ReportTemplate template)