if (searchString.equals("") || searchString.startsWith("SIMPLE :")) {
try {
HrFacadeHome aa = (HrFacadeHome)CVUtility.getHomeObject(
"com.centraview.hr.hrfacade.HrFacadeHome", "HrFacade");
HrFacade remote = (HrFacade)aa.create();
remote.setDataSource(this.dataSource);
DL = remote.getExpenseFormList(individualID, hm);
DL.setTotalNoOfRecords(DL.size());
DL.setListType("Expenses");
DL.setDirtyFlag(false);
} catch (Exception e) {
System.out.println("ListGenerator::getExpensesList" + e);
}
ExpenseFormList DL1 = new ExpenseFormList();
DL1.setSortMember(DL2.getSortMember());
DL1.setSortType(DL2.getSortType());
DL1.setStartAT(DL2.getStartAT());
DL1.setEndAT(DL2.getEndAT());
DL1.setSearchString(searchString);
DL1.setListType("Expenses");
int beginIndex = 0;
int endIndex = 0;
int tnorec = DL.size();
if (tnorec > EndAt) {
if (tnorec > EndAt + 100)
beginIndex = startAT - 100;
if (beginIndex < 1)
beginIndex = 1;
endIndex = EndAt + 100;
} else {
beginIndex = 1;
endIndex = EndAt;
}
DL1.setBeginIndex(beginIndex);
DL1.setEndIndex(endIndex);
// search String
// ****** sort
DL1 = (ExpenseFormList)this.Sort(DL1, DL);
DL1.setSearchString(searchString);
if (!searchString.equals(""))
DL1.search();
DL1.setListID(DLparam.getListID());
DL1.setTotalNoOfRecords(DL1.size());
DL1.setBeginIndex(1);
DL1.setEndIndex(DL1.size());
DL2.setBeginIndex(0);
DL2.setEndIndex(0);
DL2.setSearchString(searchString);
displayLists.put(new Long(DLparam.getListID()), DL2);
return DL1;
}// end of "" or SIMPLE :
else // for ADVANCE:
{
String powerString = DLparam.getPowerString();
try {
HrFacadeHome aa = (HrFacadeHome)CVUtility.getHomeObject(
"com.centraview.hr.hrfacade.HrFacadeHome", "HrFacade");
hm.put("ADVANCESEARCHSTRING", searchString);
HrFacade remote = (HrFacade)aa.create();
remote.setDataSource(this.dataSource);
DL = remote.getExpenseFormList(individualID, hm);
DL.setTotalNoOfRecords(DL.size());
DL.setListType("Expenses");
DL.setDirtyFlag(false);
} catch (Exception e) {
System.out.println("ListGenerator::getExpensesList" + e);