use of edu.cornell.kfs.coa.businessobject.AccountReversion in project cu-kfs by CU-CommunityApps.
the class AccountReversionTrickleDownInactivationServiceImpl method createAccountReversionChunk.
/**
* Creates a String for the given account reversions.
*
* @param listOfAccountReversions
* @param startIndex
* @param endIndex
* @return
*/
protected String createAccountReversionChunk(List<AccountReversion> listOfAccountReversions, int startIndex, int endIndex) {
StringBuilder buf = new StringBuilder();
for (int i = startIndex; i < endIndex && i < listOfAccountReversions.size(); i++) {
AccountReversion accountReversion = listOfAccountReversions.get(i);
buf.append(accountReversion.getUniversityFiscalYear()).append(" - ").append(accountReversion.getChartOfAccountsCode()).append(" - ").append(accountReversion.getAccountNumber());
if (i + 1 < endIndex && i + 1 < listOfAccountReversions.size()) {
buf.append(", ");
}
}
return buf.toString();
}
use of edu.cornell.kfs.coa.businessobject.AccountReversion in project cu-kfs by CU-CommunityApps.
the class AccountReversionImportServiceImplTest method testImportAccountReversions.
public void testImportAccountReversions() {
accountReversionImportService.importAccountReversions(dataFileSrc);
Map<String, String> pks = new HashMap<String, String>();
pks.put("universityFiscalYear", accountReversion.getUniversityFiscalYear().toString());
pks.put("chartOfAccountsCode", accountReversion.getChartOfAccountsCode());
pks.put("accountNumber", accountReversion.getAccountNumber());
AccountReversion accountReversionDB = businessObjectService.findByPrimaryKey(AccountReversion.class, pks);
assertTrue(ObjectUtils.isNotNull(accountReversionDB));
assertEquals(accountReversion.getBudgetReversionChartOfAccountsCode(), accountReversionDB.getBudgetReversionChartOfAccountsCode());
assertEquals(accountReversion.getBudgetReversionAccountNumber(), accountReversionDB.getBudgetReversionAccountNumber());
assertEquals(accountReversion.getCashReversionFinancialChartOfAccountsCode(), accountReversionDB.getCashReversionFinancialChartOfAccountsCode());
assertEquals(accountReversion.getCashReversionChartCashObjectCode(), accountReversionDB.getCashReversionChartCashObjectCode());
assertEquals(accountReversion.getCashReversionAccountNumber(), accountReversionDB.getCashReversionAccountNumber());
assertEquals(accountReversion.isCarryForwardByObjectCodeIndicator(), accountReversionDB.isCarryForwardByObjectCodeIndicator());
}
Aggregations