KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > common > CubeReportResult


1 package com.calipso.reportgenerator.common;
2
3 import java.util.Vector JavaDoc;
4 import java.util.Collection JavaDoc;
5
6 /**
7  *
8  * User: soliveri
9  * Date: Dec 16, 2003
10  * Time: 2:12:49 PM
11  *
12  */

13
14 public class CubeReportResult extends ReportResult {
15
16   private HeaderTableModel rowsModel;
17   private HeaderTableModel columnsModel;
18   private Vector JavaDoc dataVector;
19   private ReportTableModel reportTable = null;
20
21   public CubeReportResult(ReportSpec reportSpec, ReportQuery reportQuery, HeaderTableModel rowsModel,
22                           HeaderTableModel columnsModel, Vector JavaDoc dataVector) {
23     super(reportSpec, reportQuery);
24     this.rowsModel = rowsModel;
25     this.columnsModel = columnsModel;
26     this.dataVector = dataVector;
27   }
28
29   public HeaderTableModel getRowsModel() {
30     return rowsModel;
31   }
32
33   public HeaderTableModel getColumnsModel() {
34     return columnsModel;
35   }
36
37   public Vector JavaDoc getDataVector() {
38     return dataVector;
39   }
40
41   public ReportTableModel getReportTableModel() throws InfoException {
42     if(reportTable==null){
43       reportTable = new CubeReportTableModel(this);
44     }
45     return reportTable;
46   }
47
48   public void resetReportTableModel(){
49       reportTable = null;
50   }
51
52   public Collection JavaDoc getValuesCollection(boolean ascending) {
53     return getRowsModel().getDimensionValueNode().getSubNodesList();
54   }
55
56   public ReportQuery getReportQuery() {
57     return super.getReportQuery();
58   }
59
60   public ReportSpec getReportSpec() {
61     return super.getReportSpec();
62   }
63 }
64
Popular Tags