Prev | Current Page 680 | Next

Frank Zammetti

"Practical DWR 2 Projects"

UML diagram of the ReportDescriptor class
No code is shown here as it??™s just a collection of private fields with public getters and
setters for each.
ReportWorker.java
The ReportWorker class is very much like the FavoritesWorker and GroupWorker class we??™ve
looked at already, but as obvious as the fact that Worf is apparently like that ugly kid in school
who somehow still managed to get the best girls just because he seemed dangerous (come on,
Dax and Deanna?!?), the ReportWorker deals with reports. You can see its UML diagram in
Figure 7-22.
Figure 7-22. UML diagram of the ReportWorker class
CHAPTER 7 n ENTER THE ENTERPRISE: A DWR-BASED REPORT PORTAL 398
There are four SQL queries present in this class, and they are listed and described in
Table 7-6.
Table 7-6. The SQL Statements Contained in the ReportWorker Class
SQL Statement Class Field Description
SELECT * FROM reports SQL_GET_REPORTS_LIST Returns a list of reports known to
the portal
INSERT INTO reports SQL_ADD_REPORT_TO_PORTAL Adds a report to the portal
(reportname, description,
groups, reportxml,
datasourcename)
VALUES('${reportname}',
'${description}',
'${groups}',
'${reportxml}',
'${datasourcename}')
DELETE FROM reports WHERE SQL_DELETE_REPORT_1 Deletes a report from the portal
reportname='${reportname}' (first of two queries, this one for
the reports table)
DELETE FROM schedules WHERE SQL_DELETE_REPORT_2 Deletes a report from the portal
reportname='${reportname}' (second of two queries, this one
for the schedules table)
The first method we find is getReportsList(), which actually is a bit different from the
other list methods we??™ve seen before.


Pages:
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692