executeQuery(
SQL_GET_SCHEDULED_REPORTS_LIST, new HashMap());
List
reportList =
new ArrayList();
for (Map m : reports) {
ReportScheduleDescriptor report = new ReportScheduleDescriptor();
report.setReportName((String)m.get("REPORTNAME"));
report.setScheduledBy((String)m.get("SCHEDULEDBY"));
report.setDaysOfWeek((String)m.get("DAYSOFWEEK"));
report.setRunTime((Time)m.get("RUNTIME"));
report.setLastRun((String)m.get("LASTRUN"));
report.setLastRunStatus((String)m.get("LASTRUNSTATUS"));
reportList.add(report);
}
return reportList;
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
It??™s very much like all the other list methods we??™ve seen, so there??™s no need to go into it, I
think. Let??™s instead get right to the next method, addReportToSchedule():
@SuppressWarnings("unchecked")
public List addReportToSchedule(
final ReportScheduleDescriptor inReportScheduleDescriptor)
throws Exception {
try {
Map tokens = new HashMap();
tokens.put("reportname", inReportScheduleDescriptor.getReportName());
tokens.put("scheduledby", inReportScheduleDescriptor.getScheduledBy());
tokens.put("daysofweek", inReportScheduleDescriptor.
Pages:
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708