if (searchString.equals("") || searchString.startsWith("SIMPLE :")) {
try {
// ProjectFacadeHome aa =
// (ProjectFacadeHome)CVUtility.getHomeObject("com.centraview.projects.project.ProjectFacadeHome","ProjectFacade");
ProjectFacadeHome aa = (ProjectFacadeHome)CVUtility.getHomeObject(
"com.centraview.projects.projectfacade.ProjectFacadeHome", "ProjectFacade");
ProjectFacade remote = (ProjectFacade)aa.create();
remote.setDataSource(this.dataSource);
DL = remote.getAllTimeSlipList(userID, hm);
DL.setTotalNoOfRecords(DL.size());
DL.setListType("Timeslip");
DL.setDirtyFlag(false);
} catch (Exception e) {
System.out.println("ListGenerator::getTimeSlipList" + e);
}
// end synchronized
TimeSlipList DL1 = new TimeSlipList();
DL1.setSortMember(DL2.getSortMember());
DL1.setSortType(DL2.getSortType());
DL1.setStartAT(DL2.getStartAT());
DL1.setEndAT(DL2.getEndAT());
DL1.setSearchString(searchString);
DL1.setListType("Timeslip");
int beginIndex = 0;
int endIndex = 0;
/*
* int startAT = DL2.getStartAT(); int EndAt = DL2.getEndAT();
*/
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);
// ****** sort
DL1 = (TimeSlipList)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 {
ProjectFacadeHome aa = (ProjectFacadeHome)CVUtility.getHomeObject(
"com.centraview.projects.projectfacade.ProjectFacadeHome", "ProjectFacade");
hm.put("ADVANCESEARCHSTRING", searchString);
ProjectFacade remote = (ProjectFacade)aa.create();
remote.setDataSource(this.dataSource);
DL = remote.getAllTimeSlipList(userID, hm);
DL.setTotalNoOfRecords(DL.size());
DL.setListType("Timeslip");