1 package com.calipso.reportgenerator.reportmanager; 2 3 import com.calipso.reportgenerator.common.InfoException; 4 import java.util.Iterator ; 5 import com.calipso.reportgenerator.reportcalculator.Pivot; 6 import com.calipso.reportgenerator.reportcalculator.DataTree; 7 import com.calipso.reportgenerator.common.ReportQuery; 8 import com.calipso.reportgenerator.common.ReportSpec; 9 10 13 14 public class StaticReportData extends ReportData { 15 private DataTree dataTree; 16 17 public Object [] getMetricValues(int[] ints, Object [] objects){ 18 return null; 19 } 20 24 public StaticReportData(ReportSpec reportSpec){ 25 super(reportSpec); 26 dataTree = new DataTree(); 27 dataTree.setDefinition(reportSpec); 28 } 29 30 31 public Iterator valuesFor(int dimension, int[] previousDimensions, Object [] values) { 32 return getDataTree().valuesFor(dimension, previousDimensions, values); 33 } 34 35 39 public ReportDataIterator iterator() { 40 return new StaticReportDataIterator(getDataTree().iterator()); 41 } 42 43 public Object [] measuresAtDimensionsValues(int[] dimensions, Object [] values) { 44 return getDataTree().measuresAtDimensionsValues(dimensions, values); 45 } 46 47 53 protected void doSetQuery(ReportQuery query, Pivot pivot) throws InfoException { 54 getDataTree().setQuery(query.getStaticQuery()); 55 pivot.fill(getDataTree()); 56 } 57 58 62 public DataTree getDataTree() { 63 return dataTree; 64 } 65 } 66 | Popular Tags |