}
}
if (flag == false) {
ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
"com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
try {
HashMap hm = new HashMap();
ContactFacade remote = (ContactFacade)aa.create();
remote.setDataSource(this.dataSource);
DL = remote.getAllGroupList(userID, hm);
DL.setIndividualId(userID);
DL.setSortMember(sortColumn);
DL.setListType("Group");
DL.setDirtyFlag(false);
if (DL.getTotalNoOfRecords() == DL.getEndIndex()) {
globalLists.put("Group", DL);
}
} catch (Exception e) {
System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
}
flag = true;
}
GroupList DL1 = new GroupList();
DL1.setListType("Group");
DL1.setSortMember(sortColumn);
DL1.setStartAT(startAT);
DL1.setEndAT(EndAt);
DL1.setSearchString(searchString);
int beginIndex = 0;
int endIndex = 0;
int tnorec = DL.size();
if (tnorec > EndAt) {
beginIndex = startAT - 5;
if (beginIndex < 1)
beginIndex = 1;
endIndex = EndAt + 5;
} else {
beginIndex = 1;
endIndex = EndAt;
}
DL1.setBeginIndex(beginIndex);
DL1.setEndIndex(endIndex);
/** *** sort function *** */
DL1 = (GroupList)Sort(DL1, DL);
DL1.setTotalNoOfRecords(DL.size());
// getFilteredList( DL1.getBeginIndex() , DL1.getEndIndex() , DL1 );
long currentListID = this.getNextListID();
DL1.setListID(currentListID);
GroupList DL2 = createEmptyObject(DL1);
DL2.setTotalNoOfRecords(DL.size());
DL2.setListID(currentListID);
DL2.setSortMember(sortColumn);
DL2.setListType("Group");
DL2.setStartAT(startAT);
DL2.setEndAT(EndAt);
displayLists.put(new Long(currentListID), DL2);
Set s = DL.keySet();
Iterator it = s.iterator();
int i = 0;
// IQ adde to filter only those records which the user has right to see
Vector allAccRec = new Vector();
try {
ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
"com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
ContactFacade remote = (ContactFacade)aa.create();
remote.setDataSource(this.dataSource);
allAccRec = remote.getGroupAccessRecords(userID);
} catch (Exception e) {}
while (it.hasNext()) {