private void populateReportsGrid() { ReportListVoCollection reportColl = domain.listReports(); ReportsCategoryListVoCollection voReportsCategoryColl = domain.listCategories(); populateCategoriesGrid(voReportsCategoryColl); populateReports(reportColl); }
private void populateCategoriesGrid(ReportsCategoryListVoCollection voReportsCategoryColl) { if (voReportsCategoryColl == null) return; addParentCategories(voReportsCategoryColl); }
private void addParentCategories(ReportsCategoryListVoCollection voReportsCategoryColl) { for (int i = 0; i < voReportsCategoryColl.size(); i++) { // Display the parent category - (when parent = null) if (voReportsCategoryColl.get(i).getParentCategory() == null) addCategory(null, voReportsCategoryColl.get(i)); } }
private void addSubcategories(DynamicGridRow rowParent, ReportsCategoryListVoCollection voReportsCategoryColl) { for (int i = 0; i < voReportsCategoryColl.size(); i++) { addCategory(rowParent, voReportsCategoryColl.get(i)); } }
private void addParentCategories(ReportsCategoryListVoCollection voReportsCategoryColl) { for (int i = 0; i < voReportsCategoryColl.size(); i++) { if(hasReports(voReportsCategoryColl.get(i))) { // Display the parent category - (when parent = null) if (voReportsCategoryColl.get(i).getParentCategory() == null) addCategory(null, voReportsCategoryColl.get(i)); else { try { ReportsCategoryListVo rootCat = domain.getRootCategory(voReportsCategoryColl.get(i).getParentCategory()); if(hasReports(rootCat)) addCategory(null, rootCat); } catch (DomainInterfaceException e) { e.printStackTrace(); engine.showMessage("Error getting root category for '" + voReportsCategoryColl.get(i).getName() + "' !\n" + e.toString()); } } } } }
private void addSubcategories(DynamicGridRow rowParent, ReportsCategoryListVoCollection voReportsCategoryColl) { for (int i = 0; i < voReportsCategoryColl.size(); i++) { if(hasReports(voReportsCategoryColl.get(i))) addCategory(rowParent, voReportsCategoryColl.get(i)); } }
@SuppressWarnings("unchecked") public ReportsCategoryListVoCollection listCategories() { StringBuffer hql = new StringBuffer(); hql.append("from ReportsCategory as r1_1"); hql.append(" where r1_1.isRIE is null"); DomainFactory factory = getDomainFactory(); List list = factory.find(hql.toString()); return ReportsCategoryListVoAssembler.createReportsCategoryListVoCollectionFromReportsCategory(list).sort(); }
/** * list the categories */ public ims.admin.vo.ReportsCategoryListVoCollection listCategories() { ReportRunner impl = (ReportRunner)getDomainImpl(ReportRunnerImpl.class); return impl.listCategories(); }