ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter/CpuUserReport.java
Revision: 1.1
Committed: Mon Dec 11 16:28:13 2000 UTC (25 years ago) by pjm2
Branch: MAIN
Log Message:
Produces a report of the available memory in a host.  This class extends
the Report class with its own custom functionality.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2
3 //---IMPORTS---
4 import java.sql.*;
5
6 /**
7 * Produces a report of the available memory in a host.
8 *
9 * @author $Author: pjm2 $
10 * @version $Id: $
11 */
12 public class CpuUserReport extends Report {
13
14 //---FINAL ATTRIBUTES---
15
16 //---STATIC METHODS---
17
18 //---CONSTRUCTORS---
19
20 public CpuUserReport(String directory, Statement stmt, String machine_name, long startDate, long endDate){
21 super (directory, stmt, machine_name, startDate, endDate);
22 }
23
24 //---PUBLIC METHODS---
25
26 // Override the superclass here to obtain special functionality.
27 public void createReport(){
28
29 // Special funtionality.
30 setReportField("packet.cpu.user");
31 _sql = "SELECT * FROM packet_test pkt, parameter_test param WHERE pkt.id=param.packet_id AND pkt.machine_name='"+_machine_name+"' AND pkt.receipt_date >= "+_startDate+" AND pkt.receipt_date <= "+_endDate+" AND param.name='"+_reportField+"';";
32
33 // Now carry on with the normal method for creating reports.
34 super.createReport();
35 }
36
37 //---PRIVATE METHODS---
38
39 //---ACCESSOR/MUTATOR METHODS---
40
41 //---ATTRIBUTES---
42
43 //---STATIC ATTRIBUTES---
44
45 }