/**
  * Get all reports of a category.
  *
  * @param categoryId the category id
  */
 public static List<Reporting> getReportingAsListByCategory(Long categoryId) {
   return findReporting
       .where()
       .eq("deleted", false)
       .eq("reportingCategory.id", categoryId)
       .findList();
 }
 /**
  * Get by id.
  *
  * @param id the reporting authorization id
  */
 public static ReportingAuthorization getReportingAuthorizationById(Long id) {
   return findReportingAuthorization.where().eq("id", id).findUnique();
 }
 /** Get the all reports. */
 public static List<Reporting> getReportingAsList() {
   return findReporting.where().eq("deleted", false).findList();
 }
 /** Get the custom reports. */
 public static List<Reporting> getReportingCustomAsList() {
   return findReporting.where().eq("deleted", false).eq("isStandard", false).findList();
 }
 /**
  * Get a report by template name.
  *
  * @param template the template name
  */
 public static Reporting getReportingByTemplate(String template) {
   return findReporting.where().eq("deleted", false).eq("template", template).findUnique();
 }
 /**
  * Get a report by id.
  *
  * @param id the report id
  */
 public static Reporting getReportingById(Long id) {
   return findReporting.where().eq("deleted", false).eq("id", id).findUnique();
 }