Package io.jmix.reports
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.
Application should generally should use this interface to load reports, instead of DataManager.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsReportByCode(String code) Checks if there are any reports with the given code.booleanexistsReportByGroup(ReportGroup group) Checks if any reports are connected to the given group.Load all known reports.intgetTotalCount(ReportFilter filter) Calculate total count of reports that conform to passed filter.loadForRunningByCode(String reportCode) Load by code a full report object with all details, suitable for passing it to the rendering engine.loadList(ReportLoadContext loadContext) Load list of reports, with filtering, pagination and sorting options available.loadReportIdByCode(String code) Loads report id by its code.reloadForRunning(Report report) reloadTemplateForRunning(ReportTemplate template) Saves Report entity to the database.
-
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 usingreloadForRunning(Report)method.- Returns:
- list of reports with only basic properties loaded
-
loadList
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 usingreloadForRunning(Report)method.- Parameters:
loadContext- context containing filtering, pagination and sorting options- Returns:
- list of reports with only basic properties loaded
-
getTotalCount
Calculate total count of reports that conform to passed filter.- Parameters:
filter- object with filter values- Returns:
- count of suitable reports
-
loadForRunningByCode
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
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
Loads report id by its code.- Parameters:
code- report code.- Returns:
Optionalid for report.
-
existsReportByGroup
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
Saves Report entity to the database.- Parameters:
report- report entity instance- Returns:
- saved instance
-
reloadForRunning
-
reloadTemplateForRunning
-