searchString = "";
}
// This will do Simple search
if (searchString.equals("") || searchString.startsWith("SIMPLE :")) {
ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
"com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
try {
ContactFacade remote = (ContactFacade)aa.create();
remote.setDataSource(this.dataSource);
HashMap hm = new HashMap();
if (DLparam.getSortMember() != null) {
hm.put("sortColumn", DLparam.getSortMember());
}
hm.put("sortDirection", DLparam.getSortType() + "");
if (dbID != 0) {
hm.put("ListID", new Integer(dbID));
}
hm.put("dbID", new Integer(dbID));
DL = remote.getAllIndividualList(DLparam.getIndividualId(), hm);
DL.setTotalNoOfRecords(DL.size());
DL.setListType("Individual");
DL.setSortMember(DL2.getSortMember());
DL.setDirtyFlag(false);
DL.setDbID(dbID);
if (DL.getTotalNoOfRecords() == DL.getEndIndex()) {
globalLists.put("Individual", DL);
}
} catch (Exception e) {
System.out
.println("[Exception][ListGenerator] Exception thrown in getIndividualList(DisplayList, int):2304 :"
+ e);
e.printStackTrace();
}
DL.setSortType(DL2.getSortType());
DL.setStartAT(DL2.getStartAT());
DL.setEndAT(DL2.getEndAT());
DL.setDbID(DL2.getDbID());
DL.setSearchString(searchString);
DL.setListType("Individual");
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;
}
DL.setBeginIndex(beginIndex);
DL.setEndIndex(endIndex);
DL2.setBeginIndex(0);
DL2.setEndIndex(0);
DL.setSearchString(searchString);
if (!searchString.equals("")) {
DL.search("Name");
}
DL.setTotalNoOfRecords(DL.size());
DL.setListID(DLparam.getListID());
return DL;
}// end of if SIMPLE :
else // for ADVANCE:
{
String powerString = DLparam.getPowerString();
try {
ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
"com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
HashMap hm = new HashMap();
if (DLparam.getSortMember() != null) {
hm.put("sortColumn", DLparam.getSortMember());
}
hm.put("sortDirection", DLparam.getSortType() + "");
hm.put("ADVANCESEARCHSTRING", searchString);
ContactFacade remote = (ContactFacade)aa.create();
remote.setDataSource(this.dataSource);
DL = remote.getAllIndividualList(DLparam.getIndividualId(), hm);
DL.setTotalNoOfRecords(DL.size());