01: package com.calipso.reportgenerator.common;
02:
03: import java.util.Vector;
04: import java.util.Collection;
05:
06: /**
07: *
08: * User: soliveri
09: * 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 dataVector;
19: private ReportTableModel reportTable = null;
20:
21: public CubeReportResult(ReportSpec reportSpec,
22: ReportQuery reportQuery, HeaderTableModel rowsModel,
23: HeaderTableModel columnsModel, Vector dataVector) {
24: super (reportSpec, reportQuery);
25: this .rowsModel = rowsModel;
26: this .columnsModel = columnsModel;
27: this .dataVector = dataVector;
28: }
29:
30: public HeaderTableModel getRowsModel() {
31: return rowsModel;
32: }
33:
34: public HeaderTableModel getColumnsModel() {
35: return columnsModel;
36: }
37:
38: public Vector getDataVector() {
39: return dataVector;
40: }
41:
42: public ReportTableModel getReportTableModel() throws InfoException {
43: if (reportTable == null) {
44: reportTable = new CubeReportTableModel(this );
45: }
46: return reportTable;
47: }
48:
49: public void resetReportTableModel() {
50: reportTable = null;
51: }
52:
53: public Collection getValuesCollection(boolean ascending) {
54: return getRowsModel().getDimensionValueNode().getSubNodesList();
55: }
56:
57: public ReportQuery getReportQuery() {
58: return super .getReportQuery();
59: }
60:
61: public ReportSpec getReportSpec() {
62: return super.getReportSpec();
63: }
64: }
|