String searchString, String sortColumn, String fileTypeRequest, int folderID,
boolean SystemIncludeFlag)
{
if ((searchString != null) && ((searchString.trim()).length() > 0)) {
FileList dl = new FileList();
dl.setStartAT(startATparam);
dl.setEndAT(EndAtparam);
dl.setSortMember(sortColumn);
dl.setSortType('A');
dl.setSearchString(searchString);
dl.setListType("File");
dl.setSystemIncludeFlag(SystemIncludeFlag);
dl.setCurrentFolderID(folderID);
dl.setFileTypeRequest(fileTypeRequest);
long currentListID = this.getNextListID();
dl.setListID(currentListID);
displayLists.put(new Long(currentListID), dl);
return this.getEntityFileList(entityId, userId, folderID, dl);
// return dl;
} else {
FileList 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'));
hm.put("fileTypeRequest", fileTypeRequest);
hm.put("curFolderID", new Integer(folderID));
hm.put("SystemIncludeFlag", new Boolean(SystemIncludeFlag));
HashMap listMap = null;
try {
CvFileHome aa = (CvFileHome)CVUtility.getHomeObject("com.centraview.file.CvFileHome",
"CvFile");
CvFile remote = (CvFile)aa.create();
remote.setDataSource(this.dataSource);
returnDL = remote.getEntityFiles(entityId, userId, hm);
} catch (Exception e) {
System.out.println("[Exception] ListGenerator.getEntityFileList: " + e.toString());
// e.printStackTrace();
}
returnDL.setFileTypeRequest(fileTypeRequest);
returnDL.setSystemIncludeFlag(SystemIncludeFlag);
returnDL.setListType("File");
returnDL.setTotalNoOfRecords(returnDL.size());
returnDL.setCurrentFolderID(folderID);
long currentListID = this.getNextListID();
returnDL.setListID(currentListID);
returnDL.setStartAT(startATparam);
returnDL.setEndAT(EndAtparam);
FileList emptyDL = createEmptyObject(returnDL);
emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
emptyDL.setListID(currentListID);
emptyDL.setListType("File");
emptyDL.setStartAT(returnDL.getStartAT());
emptyDL.setEndAT(returnDL.getEndAT());
emptyDL.setFileTypeRequest(fileTypeRequest);
emptyDL.setSystemIncludeFlag(SystemIncludeFlag);
emptyDL.setCurrentFolderID(folderID);
displayLists.put(new Long(currentListID), emptyDL);
} catch (Exception e) {
System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
e.printStackTrace();