public void setDepositCodesFromString(
     final String depositCodesStr, final List<Long> depositCodeIds) {
   final List<CChartOfAccounts> coaList = new ArrayList<CChartOfAccounts>();
   if (StringUtils.isNotBlank(depositCodesStr)) {
     final String[] depositCodesFromStr = depositCodesStr.split(",");
     for (final String element : depositCodesFromStr)
       coaList.addAll(commonsService.getListOfDetailCode(element.split("-")[0]));
     final List<Long> depositCodeIdsLong = new ArrayList<Long>();
     if (coaList != null && coaList.size() > 0)
       for (final CChartOfAccounts coa : coaList) depositCodeIdsLong.add(coa.getId());
     depositCodeIds.addAll(depositCodeIdsLong);
   }
 }
 public void setBudgetHeadsFromString(
     final String budgetHeadsStr, final List<String> budgetHeads, final List<Long> budgetHeadIds) {
   final List<BudgetGroup> budgetHeadList = new ArrayList<BudgetGroup>();
   final List<CChartOfAccounts> coaList = new ArrayList<CChartOfAccounts>();
   if (StringUtils.isNotBlank(budgetHeadsStr)) {
     final String[] budgetHeadsFromString = budgetHeadsStr.split(",");
     for (final String element : budgetHeadsFromString)
       // Split and obtain only the glcode
       coaList.addAll(commonsService.getListOfDetailCode(element.split("-")[0]));
     budgetHeadList.addAll(budgetDetailsDAO.getBudgetHeadForGlcodeList(coaList));
     final List<Long> budgetHeadIdsLong = new ArrayList<Long>();
     final List<String> budgetHeadIdStr = new ArrayList<String>();
     if (budgetHeadList != null && budgetHeadList.size() > 0)
       for (final BudgetGroup bdgtGrp : budgetHeadList) {
         budgetHeadIdStr.add(bdgtGrp.getId().toString());
         budgetHeadIdsLong.add(bdgtGrp.getId());
       }
     budgetHeads.addAll(budgetHeadIdStr);
     budgetHeadIds.addAll(budgetHeadIdsLong);
   }
 }