KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportdefinitions > DrillDownDefinition


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4  * Schema.
5  * $Id$
6  */

7
8 package com.calipso.reportgenerator.reportdefinitions;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
12
//---------------------------------/
13

14 import com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType;
15 import java.io.IOException JavaDoc;
16 import java.io.Reader JavaDoc;
17 import java.io.Serializable JavaDoc;
18 import java.io.Writer JavaDoc;
19 import java.util.Enumeration JavaDoc;
20 import java.util.Vector JavaDoc;
21 import org.exolab.castor.xml.MarshalException;
22 import org.exolab.castor.xml.Marshaller;
23 import org.exolab.castor.xml.Unmarshaller;
24 import org.exolab.castor.xml.ValidationException;
25 import org.xml.sax.ContentHandler JavaDoc;
26
27 /**
28  * Class DrillDownDefinition.
29  *
30  * @version $Revision$ $Date$
31  */

32 public class DrillDownDefinition implements java.io.Serializable JavaDoc {
33
34
35       //--------------------------/
36
//- Class/Member Variables -/
37
//--------------------------/
38

39     /**
40      * Field _name
41      */

42     private java.lang.String JavaDoc _name;
43
44     /**
45      * Field _description
46      */

47     private java.lang.String JavaDoc _description;
48
49     /**
50      * Field _targetReportDefinitionID
51      */

52     private java.lang.String JavaDoc _targetReportDefinitionID;
53
54     /**
55      * Field _type
56      */

57     private com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType _type = com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType.valueOf("CUBE");
58
59     /**
60      * Field _parameterBindList
61      */

62     private java.util.Vector JavaDoc _parameterBindList;
63
64     /**
65      * Field _dimensionBindList
66      */

67     private java.util.Vector JavaDoc _dimensionBindList;
68
69
70       //----------------/
71
//- Constructors -/
72
//----------------/
73

74     public DrillDownDefinition() {
75         super();
76         setType(com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType.valueOf("CUBE"));
77         _parameterBindList = new Vector JavaDoc();
78         _dimensionBindList = new Vector JavaDoc();
79     } //-- com.calipso.reportgenerator.reportdefinitions.DrillDownDefinition()
80

81
82       //-----------/
83
//- Methods -/
84
//-----------/
85

86     /**
87      * Method addDimensionBind
88      *
89      * @param vDimensionBind
90      */

91     public void addDimensionBind(com.calipso.reportgenerator.reportdefinitions.DimensionBind vDimensionBind)
92         throws java.lang.IndexOutOfBoundsException JavaDoc
93     {
94         _dimensionBindList.addElement(vDimensionBind);
95     } //-- void addDimensionBind(com.calipso.reportgenerator.reportdefinitions.DimensionBind)
96

97     /**
98      * Method addDimensionBind
99      *
100      * @param index
101      * @param vDimensionBind
102      */

103     public void addDimensionBind(int index, com.calipso.reportgenerator.reportdefinitions.DimensionBind vDimensionBind)
104         throws java.lang.IndexOutOfBoundsException JavaDoc
105     {
106         _dimensionBindList.insertElementAt(vDimensionBind, index);
107     } //-- void addDimensionBind(int, com.calipso.reportgenerator.reportdefinitions.DimensionBind)
108

109     /**
110      * Method addParameterBind
111      *
112      * @param vParameterBind
113      */

114     public void addParameterBind(com.calipso.reportgenerator.reportdefinitions.ParameterBind vParameterBind)
115         throws java.lang.IndexOutOfBoundsException JavaDoc
116     {
117         _parameterBindList.addElement(vParameterBind);
118     } //-- void addParameterBind(com.calipso.reportgenerator.reportdefinitions.ParameterBind)
119

120     /**
121      * Method addParameterBind
122      *
123      * @param index
124      * @param vParameterBind
125      */

126     public void addParameterBind(int index, com.calipso.reportgenerator.reportdefinitions.ParameterBind vParameterBind)
127         throws java.lang.IndexOutOfBoundsException JavaDoc
128     {
129         _parameterBindList.insertElementAt(vParameterBind, index);
130     } //-- void addParameterBind(int, com.calipso.reportgenerator.reportdefinitions.ParameterBind)
131

132     /**
133      * Method enumerateDimensionBind
134      */

135     public java.util.Enumeration JavaDoc enumerateDimensionBind()
136     {
137         return _dimensionBindList.elements();
138     } //-- java.util.Enumeration enumerateDimensionBind()
139

140     /**
141      * Method enumerateParameterBind
142      */

143     public java.util.Enumeration JavaDoc enumerateParameterBind()
144     {
145         return _parameterBindList.elements();
146     } //-- java.util.Enumeration enumerateParameterBind()
147

148     /**
149      * Method getDescriptionReturns the value of field
150      * 'description'.
151      *
152      * @return the value of field 'description'.
153      */

154     public java.lang.String JavaDoc getDescription()
155     {
156         return this._description;
157     } //-- java.lang.String getDescription()
158

159     /**
160      * Method getDimensionBind
161      *
162      * @param index
163      */

164     public com.calipso.reportgenerator.reportdefinitions.DimensionBind getDimensionBind(int index)
165         throws java.lang.IndexOutOfBoundsException JavaDoc
166     {
167         //-- check bounds for index
168
if ((index < 0) || (index > _dimensionBindList.size())) {
169             throw new IndexOutOfBoundsException JavaDoc();
170         }
171         
172         return (com.calipso.reportgenerator.reportdefinitions.DimensionBind) _dimensionBindList.elementAt(index);
173     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionBind getDimensionBind(int)
174

175     /**
176      * Method getDimensionBind
177      */

178     public com.calipso.reportgenerator.reportdefinitions.DimensionBind[] getDimensionBind()
179     {
180         int size = _dimensionBindList.size();
181         com.calipso.reportgenerator.reportdefinitions.DimensionBind[] mArray = new com.calipso.reportgenerator.reportdefinitions.DimensionBind[size];
182         for (int index = 0; index < size; index++) {
183             mArray[index] = (com.calipso.reportgenerator.reportdefinitions.DimensionBind) _dimensionBindList.elementAt(index);
184         }
185         return mArray;
186     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionBind[] getDimensionBind()
187

188     /**
189      * Method getDimensionBindCount
190      */

191     public int getDimensionBindCount()
192     {
193         return _dimensionBindList.size();
194     } //-- int getDimensionBindCount()
195

196     /**
197      * Method getNameReturns the value of field 'name'.
198      *
199      * @return the value of field 'name'.
200      */

201     public java.lang.String JavaDoc getName()
202     {
203         return this._name;
204     } //-- java.lang.String getName()
205

206     /**
207      * Method getParameterBind
208      *
209      * @param index
210      */

211     public com.calipso.reportgenerator.reportdefinitions.ParameterBind getParameterBind(int index)
212         throws java.lang.IndexOutOfBoundsException JavaDoc
213     {
214         //-- check bounds for index
215
if ((index < 0) || (index > _parameterBindList.size())) {
216             throw new IndexOutOfBoundsException JavaDoc();
217         }
218         
219         return (com.calipso.reportgenerator.reportdefinitions.ParameterBind) _parameterBindList.elementAt(index);
220     } //-- com.calipso.reportgenerator.reportdefinitions.ParameterBind getParameterBind(int)
221

222     /**
223      * Method getParameterBind
224      */

225     public com.calipso.reportgenerator.reportdefinitions.ParameterBind[] getParameterBind()
226     {
227         int size = _parameterBindList.size();
228         com.calipso.reportgenerator.reportdefinitions.ParameterBind[] mArray = new com.calipso.reportgenerator.reportdefinitions.ParameterBind[size];
229         for (int index = 0; index < size; index++) {
230             mArray[index] = (com.calipso.reportgenerator.reportdefinitions.ParameterBind) _parameterBindList.elementAt(index);
231         }
232         return mArray;
233     } //-- com.calipso.reportgenerator.reportdefinitions.ParameterBind[] getParameterBind()
234

235     /**
236      * Method getParameterBindCount
237      */

238     public int getParameterBindCount()
239     {
240         return _parameterBindList.size();
241     } //-- int getParameterBindCount()
242

243     /**
244      * Method getTargetReportDefinitionIDReturns the value of field
245      * 'targetReportDefinitionID'.
246      *
247      * @return the value of field 'targetReportDefinitionID'.
248      */

249     public java.lang.String JavaDoc getTargetReportDefinitionID()
250     {
251         return this._targetReportDefinitionID;
252     } //-- java.lang.String getTargetReportDefinitionID()
253

254     /**
255      * Method getTypeReturns the value of field 'type'.
256      *
257      * @return the value of field 'type'.
258      */

259     public com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType getType()
260     {
261         return this._type;
262     } //-- com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType getType()
263

264     /**
265      * Method isValid
266      */

267     public boolean isValid()
268     {
269         try {
270             validate();
271         }
272         catch (org.exolab.castor.xml.ValidationException vex) {
273             return false;
274         }
275         return true;
276     } //-- boolean isValid()
277

278     /**
279      * Method marshal
280      *
281      * @param out
282      */

283     public void marshal(java.io.Writer JavaDoc out)
284         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
285     {
286         
287         Marshaller.marshal(this, out);
288     } //-- void marshal(java.io.Writer)
289

290     /**
291      * Method marshal
292      *
293      * @param handler
294      */

295     public void marshal(org.xml.sax.ContentHandler JavaDoc handler)
296         throws java.io.IOException JavaDoc, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
297     {
298         
299         Marshaller.marshal(this, handler);
300     } //-- void marshal(org.xml.sax.ContentHandler)
301

302     /**
303      * Method removeAllDimensionBind
304      */

305     public void removeAllDimensionBind()
306     {
307         _dimensionBindList.removeAllElements();
308     } //-- void removeAllDimensionBind()
309

310     /**
311      * Method removeAllParameterBind
312      */

313     public void removeAllParameterBind()
314     {
315         _parameterBindList.removeAllElements();
316     } //-- void removeAllParameterBind()
317

318     /**
319      * Method removeDimensionBind
320      *
321      * @param index
322      */

323     public com.calipso.reportgenerator.reportdefinitions.DimensionBind removeDimensionBind(int index)
324     {
325         java.lang.Object JavaDoc obj = _dimensionBindList.elementAt(index);
326         _dimensionBindList.removeElementAt(index);
327         return (com.calipso.reportgenerator.reportdefinitions.DimensionBind) obj;
328     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionBind removeDimensionBind(int)
329

330     /**
331      * Method removeParameterBind
332      *
333      * @param index
334      */

335     public com.calipso.reportgenerator.reportdefinitions.ParameterBind removeParameterBind(int index)
336     {
337         java.lang.Object JavaDoc obj = _parameterBindList.elementAt(index);
338         _parameterBindList.removeElementAt(index);
339         return (com.calipso.reportgenerator.reportdefinitions.ParameterBind) obj;
340     } //-- com.calipso.reportgenerator.reportdefinitions.ParameterBind removeParameterBind(int)
341

342     /**
343      * Method setDescriptionSets the value of field 'description'.
344      *
345      * @param description the value of field 'description'.
346      */

347     public void setDescription(java.lang.String JavaDoc description)
348     {
349         this._description = description;
350     } //-- void setDescription(java.lang.String)
351

352     /**
353      * Method setDimensionBind
354      *
355      * @param index
356      * @param vDimensionBind
357      */

358     public void setDimensionBind(int index, com.calipso.reportgenerator.reportdefinitions.DimensionBind vDimensionBind)
359         throws java.lang.IndexOutOfBoundsException JavaDoc
360     {
361         //-- check bounds for index
362
if ((index < 0) || (index > _dimensionBindList.size())) {
363             throw new IndexOutOfBoundsException JavaDoc();
364         }
365         _dimensionBindList.setElementAt(vDimensionBind, index);
366     } //-- void setDimensionBind(int, com.calipso.reportgenerator.reportdefinitions.DimensionBind)
367

368     /**
369      * Method setDimensionBind
370      *
371      * @param dimensionBindArray
372      */

373     public void setDimensionBind(com.calipso.reportgenerator.reportdefinitions.DimensionBind[] dimensionBindArray)
374     {
375         //-- copy array
376
_dimensionBindList.removeAllElements();
377         for (int i = 0; i < dimensionBindArray.length; i++) {
378             _dimensionBindList.addElement(dimensionBindArray[i]);
379         }
380     } //-- void setDimensionBind(com.calipso.reportgenerator.reportdefinitions.DimensionBind)
381

382     /**
383      * Method setNameSets the value of field 'name'.
384      *
385      * @param name the value of field 'name'.
386      */

387     public void setName(java.lang.String JavaDoc name)
388     {
389         this._name = name;
390     } //-- void setName(java.lang.String)
391

392     /**
393      * Method setParameterBind
394      *
395      * @param index
396      * @param vParameterBind
397      */

398     public void setParameterBind(int index, com.calipso.reportgenerator.reportdefinitions.ParameterBind vParameterBind)
399         throws java.lang.IndexOutOfBoundsException JavaDoc
400     {
401         //-- check bounds for index
402
if ((index < 0) || (index > _parameterBindList.size())) {
403             throw new IndexOutOfBoundsException JavaDoc();
404         }
405         _parameterBindList.setElementAt(vParameterBind, index);
406     } //-- void setParameterBind(int, com.calipso.reportgenerator.reportdefinitions.ParameterBind)
407

408     /**
409      * Method setParameterBind
410      *
411      * @param parameterBindArray
412      */

413     public void setParameterBind(com.calipso.reportgenerator.reportdefinitions.ParameterBind[] parameterBindArray)
414     {
415         //-- copy array
416
_parameterBindList.removeAllElements();
417         for (int i = 0; i < parameterBindArray.length; i++) {
418             _parameterBindList.addElement(parameterBindArray[i]);
419         }
420     } //-- void setParameterBind(com.calipso.reportgenerator.reportdefinitions.ParameterBind)
421

422     /**
423      * Method setTargetReportDefinitionIDSets the value of field
424      * 'targetReportDefinitionID'.
425      *
426      * @param targetReportDefinitionID the value of field
427      * 'targetReportDefinitionID'.
428      */

429     public void setTargetReportDefinitionID(java.lang.String JavaDoc targetReportDefinitionID)
430     {
431         this._targetReportDefinitionID = targetReportDefinitionID;
432     } //-- void setTargetReportDefinitionID(java.lang.String)
433

434     /**
435      * Method setTypeSets the value of field 'type'.
436      *
437      * @param type the value of field 'type'.
438      */

439     public void setType(com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType type)
440     {
441         this._type = type;
442     } //-- void setType(com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType)
443

444     /**
445      * Method unmarshal
446      *
447      * @param reader
448      */

449     public static com.calipso.reportgenerator.reportdefinitions.DrillDownDefinition unmarshal(java.io.Reader JavaDoc reader)
450         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
451     {
452         return (com.calipso.reportgenerator.reportdefinitions.DrillDownDefinition) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.DrillDownDefinition.class, reader);
453     } //-- com.calipso.reportgenerator.reportdefinitions.DrillDownDefinition unmarshal(java.io.Reader)
454

455     /**
456      * Method validate
457      */

458     public void validate()
459         throws org.exolab.castor.xml.ValidationException
460     {
461         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
462         validator.validate(this);
463     } //-- void validate()
464

465 }
466
Popular Tags