1 package com.calipso.reportgenerator.common; 2 3 import com.calipso.reportgenerator.reportdefinitions.DrillDownDefinition; 4 import com.calipso.reportgenerator.reportdefinitions.DimensionBind; 5 import com.calipso.reportgenerator.reportdefinitions.ParameterBind; 6 import com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType; 7 8 import java.util.List ; 9 import java.util.ArrayList ; 10 import java.util.Enumeration ; 11 import java.io.Serializable ; 12 13 14 17 18 public class DrillDownSpec implements Serializable { 19 private String description; 20 private String name; 21 private String targetReportDefinitionID; 22 private DrillDownDefinitionTypeType type; 23 private List dimensionBindSpecs; 24 private List parameterBindSpecs; 25 26 27 31 public void fillFrom(DrillDownDefinition drillDownDefinition){ 32 description = drillDownDefinition.getDescription(); 33 name = drillDownDefinition.getName(); 34 type = drillDownDefinition.getType(); 35 targetReportDefinitionID = drillDownDefinition.getTargetReportDefinitionID(); 36 dimensionBindSpecs = new ArrayList (); 37 Enumeration dimensionBindEnum = drillDownDefinition.enumerateDimensionBind(); 38 while (dimensionBindEnum.hasMoreElements()) { 39 DimensionBind dimensionBind = (DimensionBind) dimensionBindEnum.nextElement(); 40 DimensionBindSpec dimensionBindSpec = new DimensionBindSpec(); 41 dimensionBindSpec.fillFrom(dimensionBind); 42 dimensionBindSpecs.add(dimensionBindSpec); 43 } 44 parameterBindSpecs = new ArrayList (); 45 Enumeration parameterBindEnum = drillDownDefinition.enumerateParameterBind(); 46 while (parameterBindEnum.hasMoreElements()) { 47 ParameterBind parameterBind = (ParameterBind) parameterBindEnum.nextElement(); 48 ParameterBindSpec parameterBindSpec = new ParameterBindSpec(); 49 parameterBindSpec.fillFrom(parameterBind); 50 parameterBindSpecs.add(parameterBindSpec); 51 } 52 } 53 54 58 public String getDescription() { 59 return description; 60 } 61 62 66 public String getName() { 67 return name; 68 } 69 70 74 public String getTargetReportDefinitionID() { 75 return targetReportDefinitionID; 76 } 77 78 82 public List getDimensionBindSpecs() { 83 return dimensionBindSpecs; 84 } 85 89 public List getParameterBindSpecs() { 90 return parameterBindSpecs; 91 } 92 93 public void setType(DrillDownDefinitionTypeType type) { 94 this.type = type; 95 } 96 97 public DrillDownDefinitionTypeType getType() { 98 return type; 99 } 100 } 101 | Popular Tags |