*/
public NoteList getEntityNoteList(int entityId, int startATparam, int EndAtparam,
String searchString, String sortColumn, String noteType)
{
if ((searchString != null) && ((searchString.trim()).length() > 0)) {
NoteList dl = new NoteList();
dl.setStartAT(startATparam);
dl.setEndAT(EndAtparam);
dl.setSortMember(sortColumn);
dl.setSortType('A');
dl.setSearchString(searchString);
dl.setListType("Note");
dl.setNoteType(noteType);
long currentListID = this.getNextListID();
dl.setListID(currentListID);
displayLists.put(new Long(currentListID), dl);
return this.getEntityNoteList(entityId, dl);
} else {
NoteList 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("notetype", noteType);
try {
NoteHome aa = (NoteHome)CVUtility.getHomeObject("com.centraview.note.NoteHome", "Note");
Note remote = (Note)aa.create();
remote.setDataSource(this.dataSource);
returnDL = remote.getEntityNoteList(entityId, hm);
} catch (Exception e) {
System.out.println("[Exception] ListGenerator.getEntityNoteList: " + e.toString());
// e.printStackTrace();
}
returnDL.setNoteType(noteType);
returnDL.setListType("Note");
returnDL.setTotalNoOfRecords(returnDL.size());
long currentListID = this.getNextListID();
returnDL.setListID(currentListID);
returnDL.setStartAT(startATparam);
returnDL.setEndAT(EndAtparam);
returnDL.setNoteType(noteType);
NoteList emptyDL = createEmptyObject(returnDL);
emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
emptyDL.setListID(currentListID);
emptyDL.setListType("Note");
emptyDL.setStartAT(returnDL.getStartAT());
emptyDL.setEndAT(returnDL.getEndAT());
emptyDL.setNoteType(noteType);
displayLists.put(new Long(currentListID), emptyDL);
} catch (Exception e) {
e.printStackTrace();
}
return returnDL;