/* * This method gets RaportPageType based on BudgetPeriod. Used to set * BusgetSummary, CalculationMethodology and period to reportPageType */ private ReportPageType getCumulativeBudgetReportPageType() { ReportPageType reportPageType = ReportPageType.Factory.newInstance(); BudgetSummary budgetSummary = getCumulativeBudget(); CalculationMethodology calculationMethodology = getCumulativeCalculationMethodology(); reportPageType.setBudgetSummary(budgetSummary); reportPageType.setCalculationMethodology(calculationMethodology); reportPageType.setPeriod(budgetPeriod.getBudgetPeriod()); return reportPageType; }
/* * This method gets BudgetCumulativeReport for budgetPeriod.Used to set * ReportHeaderType with latest BudgetPeriod, CumilativePage and * RaportPageArray to budgetSummaryReport */ private BudgetSummaryReport getBudgetCumulativeReport() { BudgetSummaryReport budgetSummaryReport = BudgetSummaryReport.Factory.newInstance(); ReportPageType cumulativePageType = ReportPageType.Factory.newInstance(); BudgetParent budgetParent = budget.getBudgetParent(); ReportHeaderType reportHeaderType = getReportHeaderTypeForCumulativeReport(budgetParent); budgetSummaryReport.setReportHeader(reportHeaderType); cumulativePageType = getCumulativeBudgetReportPageType(); budgetSummaryReport.setCumilativePage(cumulativePageType); ReportPageType[] reportPageTypeList = new ReportPageType[1]; reportPageTypeList[0] = cumulativePageType; budgetSummaryReport.setReportPageArray(reportPageTypeList); return budgetSummaryReport; }