KickJava   Java API By Example, From Geeks To Geeks.

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


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 JavaDoc;
9 import java.util.ArrayList JavaDoc;
10 import java.util.Enumeration JavaDoc;
11 import java.io.Serializable JavaDoc;
12
13
14 /**
15  * Explota informacion para visualizarla de forma mas detallada
16  */

17
18 public class DrillDownSpec implements Serializable JavaDoc {
19   private String JavaDoc description;
20   private String JavaDoc name;
21   private String JavaDoc targetReportDefinitionID;
22   private DrillDownDefinitionTypeType type;
23   private List JavaDoc dimensionBindSpecs;
24   private List JavaDoc parameterBindSpecs;
25
26
27   /**
28    * Llena los parametros.
29    * @param drillDownDefinition
30    */

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 JavaDoc();
37     Enumeration JavaDoc 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 JavaDoc();
45     Enumeration JavaDoc 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   /**
55    * Retorna la descripcion
56    * @return
57    */

58   public String JavaDoc getDescription() {
59     return description;
60   }
61
62   /**
63    * Retorna el nombre.
64    * @return
65    */

66   public String JavaDoc getName() {
67     return name;
68   }
69
70   /**
71    * Retorna el id del <code>ReportDefinition</code> target.
72    * @return
73    */

74   public String JavaDoc getTargetReportDefinitionID() {
75     return targetReportDefinitionID;
76   }
77
78   /**
79    * Retorna una lista con las instancias de <code>DimensionBindSpecs</code>
80    * @return
81    */

82   public List JavaDoc getDimensionBindSpecs() {
83     return dimensionBindSpecs;
84   }
85   /**
86    * * Retorna una lista con las instancias de <code>ParameterBindSpecs</code>
87    * @return
88    */

89   public List JavaDoc 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