KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportmanager > ReportData


1 package com.calipso.reportgenerator.reportmanager;
2
3 import com.calipso.reportgenerator.reportcalculator.Pivot;
4 import com.calipso.reportgenerator.common.ReportQuery;
5 import com.calipso.reportgenerator.common.ReportSpec;
6
7 import java.util.Iterator JavaDoc;
8 import java.util.Set JavaDoc;
9 import java.io.Serializable JavaDoc;
10
11 import com.calipso.reportgenerator.common.InfoException;
12
13 /**
14  * Representa los datos de un reporte.
15  */

16
17 public abstract class ReportData implements Serializable JavaDoc {
18
19   private ReportQuery reportQuery;
20   private ReportSpec reportSpec;
21
22   /**
23    * Constructor de la clase.
24    * @param reportSpec
25    */

26   public ReportData(ReportSpec reportSpec){
27     this.reportSpec = reportSpec;
28   }
29
30   public abstract Iterator JavaDoc valuesFor(int dimension, int[] previousDimensions, Object JavaDoc[] values);
31
32   public abstract ReportDataIterator iterator();
33
34   public ReportQuery getQuery() {
35     return reportQuery;
36   }
37
38   public void setQuery(ReportQuery query, Pivot pivot) throws InfoException {
39     reportQuery = query;
40     doSetQuery(query, pivot);
41   }
42
43   protected abstract void doSetQuery(ReportQuery query, Pivot pivot) throws InfoException;
44
45   public ReportSpec getDefinition() {
46     return reportSpec;
47   }
48
49   public abstract Object JavaDoc[] measuresAtDimensionsValues(int[] dimensions, Object JavaDoc[] values);
50
51   public Set JavaDoc[] getDimensionValues() {
52     return new Set JavaDoc[0];
53   }
54
55   public abstract Object JavaDoc[] getMetricValues(int[] groupingDimensionsIndexArray, Object JavaDoc[] values);
56
57   public Set JavaDoc getDimensionValues(int index) throws InfoException {
58     return null;
59   }
60 }
61
Popular Tags