/**
  * Get the children categories of a category.
  *
  * @param parentId the category id for which we need the children
  */
 public static List<ReportingCategory> getReportingCategoryAsListByParent(Long parentId) {
   return findReportingCategory
       .orderBy("order")
       .where()
       .eq("deleted", false)
       .eq("parent.id", parentId)
       .findList();
 }
 /** Get the root categories (meaning categories without parent). */
 public static List<ReportingCategory> getReportingCategoryRootsAsList() {
   return findReportingCategory
       .orderBy("order")
       .where()
       .eq("deleted", false)
       .isNull("parent")
       .findList();
 }