public GroupMemberList getGroupMemberList(int userID, int startAt, int EndAt,
String searchString, String sortColumn, int groupID) throws CommunicationException,
NamingException
{
ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
"com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
boolean flag = checkListPresentInGlobalList("Individual");
IndividualList individualList = new IndividualList();
if (flag == true) {
individualList = (IndividualList)globalLists.get("Individual");
if (individualList.getDirtyFlag()) {
globalLists.remove("Individual");
flag = false;
}
}
if (flag == false) {
try {
HashMap hm = new HashMap();
ContactFacade remote = (ContactFacade)aa.create();
remote.setDataSource(this.dataSource);
individualList = remote.getAllIndividualList(userID, hm);
individualList.setIndividualId(userID);
individualList.setSortMember(sortColumn);
individualList.setListType("Individual");
individualList.setDirtyFlag(false);
if (individualList.getTotalNoOfRecords() == individualList.getEndIndex()) {
globalLists.put("Individual", individualList);
}
} catch (Exception e) {
System.out
.println("[ListGenerator] Exception thrown in getGroupMemberList() (first try block)): "
+ e);
// e.printStackTrace();
}
flag = true;
} // end if (flag == false)
GroupMemberList groupList = new GroupMemberList();
groupList.setListType("GroupMember");
groupList.setSortMember(sortColumn);
groupList.setStartAT(startAt);
groupList.setEndAT(EndAt);
groupList.setSearchString(searchString);
int beginIndex = 0;
int endIndex = 0;
int totalRecords = individualList.size();
// get Group MemberIDs
Vector IDVector = null;
try {
ContactFacade remote = (ContactFacade)aa.create();
IDVector = remote.getGroupMemberIDs(userID, groupID);
} catch (Exception e) {
System.out
.println("[ListGenerator] Exception thrown in getGroupMemberList() (second try block): "
+ e);