public SecurityProfileList getSecurityProfileList(int userID, int startATparam, int EndAtparam,
String searchString, String sortColumn)
{
if ((searchString != null) && ((searchString.trim()).length() > 0)) {
SecurityProfileList dl = new SecurityProfileList();
dl.setStartAT(startATparam);
dl.setEndAT(EndAtparam);
dl.setSortMember(sortColumn);
dl.setSortType('A');
dl.setSearchString(searchString);
dl.setListType("SecurityProfile");
long currentListID = this.getNextListID();
dl.setListID(currentListID);
displayLists.put(new Long(currentListID), dl);
return this.getSecurityProfileList(userID, dl);
} else {
SecurityProfileList returnDL = null;
try {
HashMap hm = new HashMap();
hm.put("startATparam", new Integer(startATparam));
hm.put("EndAtparam", new Integer(EndAtparam));
hm.put("searchString", searchString);
hm.put("sortmem", sortColumn);
hm.put("sortType", new Character('A'));
HashMap listMap = null;
try {
AuthorizationHome aa = (AuthorizationHome)CVUtility.getHomeObject(
"com.centraview.administration.authorization.AuthorizationHome", "Authorization");
Authorization remote = (Authorization)aa.create();
remote.setDataSource(this.dataSource);
returnDL = remote.getSecurityProfileList(userID, hm);
} catch (Exception e) {
System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
}
returnDL.setListType("SecurityProfile");
returnDL.setTotalNoOfRecords(returnDL.size());
long currentListID = this.getNextListID();
returnDL.setListID(currentListID);
returnDL.setStartAT(startATparam);
returnDL.setEndAT(EndAtparam);
SecurityProfileList emptyDL = createEmptyObject(returnDL);
emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
emptyDL.setListID(currentListID);
emptyDL.setListType("SecurityProfile");
emptyDL.setStartAT(returnDL.getStartAT());
emptyDL.setEndAT(returnDL.getEndAT());
displayLists.put(new Long(currentListID), emptyDL);
} catch (Exception e) {
e.printStackTrace();
}