KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
18
19 /**
20  * Class ReportViewDescriptor.
21  *
22  * @version $Revision$ $Date$
23  */

24 public class ReportViewDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27       //--------------------------/
28
//- Class/Member Variables -/
29
//--------------------------/
30

31     /**
32      * Field nsPrefix
33      */

34     private java.lang.String JavaDoc nsPrefix;
35
36     /**
37      * Field nsURI
38      */

39     private java.lang.String JavaDoc nsURI;
40
41     /**
42      * Field xmlName
43      */

44     private java.lang.String JavaDoc xmlName;
45
46     /**
47      * Field identity
48      */

49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53
//- Constructors -/
54
//----------------/
55

56     public ReportViewDescriptor() {
57         super();
58         xmlName = "ReportView";
59         
60         //-- set grouping compositor
61
setCompositorAsSequence();
62         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63         org.exolab.castor.xml.XMLFieldHandler handler = null;
64         org.exolab.castor.xml.FieldValidator fieldValidator = null;
65         //-- initialize attribute descriptors
66

67         //-- _id
68
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_id", "Id", org.exolab.castor.xml.NodeType.Attribute);
69         desc.setImmutable(true);
70         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
71             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
72                 throws IllegalStateException JavaDoc
73             {
74                 ReportView target = (ReportView) object;
75                 return target.getId();
76             }
77             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
78                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
79             {
80                 try {
81                     ReportView target = (ReportView) object;
82                     target.setId( (java.lang.String JavaDoc) value);
83                 }
84                 catch (java.lang.Exception JavaDoc ex) {
85                     throw new IllegalStateException JavaDoc(ex.toString());
86                 }
87             }
88             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
89                 return null;
90             }
91         } );
92         desc.setHandler(handler);
93         desc.setRequired(true);
94         addFieldDescriptor(desc);
95         
96         //-- validation code for: _id
97
fieldValidator = new org.exolab.castor.xml.FieldValidator();
98         fieldValidator.setMinOccurs(1);
99         { //-- local scope
100
StringValidator typeValidator = new StringValidator();
101             typeValidator.setWhiteSpace("preserve");
102             fieldValidator.setValidator(typeValidator);
103         }
104         desc.setValidator(fieldValidator);
105         //-- _description
106
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_description", "Description", org.exolab.castor.xml.NodeType.Attribute);
107         desc.setImmutable(true);
108         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
109             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
110                 throws IllegalStateException JavaDoc
111             {
112                 ReportView target = (ReportView) object;
113                 return target.getDescription();
114             }
115             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
116                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
117             {
118                 try {
119                     ReportView target = (ReportView) object;
120                     target.setDescription( (java.lang.String JavaDoc) value);
121                 }
122                 catch (java.lang.Exception JavaDoc ex) {
123                     throw new IllegalStateException JavaDoc(ex.toString());
124                 }
125             }
126             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
127                 return null;
128             }
129         } );
130         desc.setHandler(handler);
131         addFieldDescriptor(desc);
132         
133         //-- validation code for: _description
134
fieldValidator = new org.exolab.castor.xml.FieldValidator();
135         { //-- local scope
136
StringValidator typeValidator = new StringValidator();
137             typeValidator.setWhiteSpace("preserve");
138             fieldValidator.setValidator(typeValidator);
139         }
140         desc.setValidator(fieldValidator);
141         //-- _reportDefinitionId
142
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_reportDefinitionId", "ReportDefinitionId", org.exolab.castor.xml.NodeType.Attribute);
143         desc.setImmutable(true);
144         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
145             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
146                 throws IllegalStateException JavaDoc
147             {
148                 ReportView target = (ReportView) object;
149                 return target.getReportDefinitionId();
150             }
151             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
152                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
153             {
154                 try {
155                     ReportView target = (ReportView) object;
156                     target.setReportDefinitionId( (java.lang.String JavaDoc) value);
157                 }
158                 catch (java.lang.Exception JavaDoc ex) {
159                     throw new IllegalStateException JavaDoc(ex.toString());
160                 }
161             }
162             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
163                 return null;
164             }
165         } );
166         desc.setHandler(handler);
167         desc.setRequired(true);
168         addFieldDescriptor(desc);
169         
170         //-- validation code for: _reportDefinitionId
171
fieldValidator = new org.exolab.castor.xml.FieldValidator();
172         fieldValidator.setMinOccurs(1);
173         { //-- local scope
174
StringValidator typeValidator = new StringValidator();
175             typeValidator.setWhiteSpace("preserve");
176             fieldValidator.setValidator(typeValidator);
177         }
178         desc.setValidator(fieldValidator);
179         //-- _userID
180
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_userID", "UserID", org.exolab.castor.xml.NodeType.Attribute);
181         desc.setImmutable(true);
182         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
183             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
184                 throws IllegalStateException JavaDoc
185             {
186                 ReportView target = (ReportView) object;
187                 return target.getUserID();
188             }
189             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
190                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
191             {
192                 try {
193                     ReportView target = (ReportView) object;
194                     target.setUserID( (java.lang.String JavaDoc) value);
195                 }
196                 catch (java.lang.Exception JavaDoc ex) {
197                     throw new IllegalStateException JavaDoc(ex.toString());
198                 }
199             }
200             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
201                 return null;
202             }
203         } );
204         desc.setHandler(handler);
205         desc.setRequired(true);
206         addFieldDescriptor(desc);
207         
208         //-- validation code for: _userID
209
fieldValidator = new org.exolab.castor.xml.FieldValidator();
210         fieldValidator.setMinOccurs(1);
211         { //-- local scope
212
StringValidator typeValidator = new StringValidator();
213             typeValidator.setWhiteSpace("preserve");
214             fieldValidator.setValidator(typeValidator);
215         }
216         desc.setValidator(fieldValidator);
217         //-- _userName
218
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_userName", "UserName", org.exolab.castor.xml.NodeType.Attribute);
219         desc.setImmutable(true);
220         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
221             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
222                 throws IllegalStateException JavaDoc
223             {
224                 ReportView target = (ReportView) object;
225                 return target.getUserName();
226             }
227             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
228                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
229             {
230                 try {
231                     ReportView target = (ReportView) object;
232                     target.setUserName( (java.lang.String JavaDoc) value);
233                 }
234                 catch (java.lang.Exception JavaDoc ex) {
235                     throw new IllegalStateException JavaDoc(ex.toString());
236                 }
237             }
238             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
239                 return null;
240             }
241         } );
242         desc.setHandler(handler);
243         desc.setRequired(true);
244         addFieldDescriptor(desc);
245         
246         //-- validation code for: _userName
247
fieldValidator = new org.exolab.castor.xml.FieldValidator();
248         fieldValidator.setMinOccurs(1);
249         { //-- local scope
250
StringValidator typeValidator = new StringValidator();
251             typeValidator.setWhiteSpace("preserve");
252             fieldValidator.setValidator(typeValidator);
253         }
254         desc.setValidator(fieldValidator);
255         //-- _reportLayout
256
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_reportLayout", "ReportLayout", org.exolab.castor.xml.NodeType.Attribute);
257         desc.setImmutable(true);
258         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
259             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
260                 throws IllegalStateException JavaDoc
261             {
262                 ReportView target = (ReportView) object;
263                 return target.getReportLayout();
264             }
265             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
266                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
267             {
268                 try {
269                     ReportView target = (ReportView) object;
270                     target.setReportLayout( (java.lang.String JavaDoc) value);
271                 }
272                 catch (java.lang.Exception JavaDoc ex) {
273                     throw new IllegalStateException JavaDoc(ex.toString());
274                 }
275             }
276             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
277                 return null;
278             }
279         } );
280         desc.setHandler(handler);
281         addFieldDescriptor(desc);
282         
283         //-- validation code for: _reportLayout
284
fieldValidator = new org.exolab.castor.xml.FieldValidator();
285         { //-- local scope
286
StringValidator typeValidator = new StringValidator();
287             typeValidator.setWhiteSpace("preserve");
288             fieldValidator.setValidator(typeValidator);
289         }
290         desc.setValidator(fieldValidator);
291         //-- _visibleTotals
292
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_visibleTotals", "VisibleTotals", org.exolab.castor.xml.NodeType.Attribute);
293         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
294             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
295                 throws IllegalStateException JavaDoc
296             {
297                 ReportView target = (ReportView) object;
298                 if(!target.hasVisibleTotals())
299                     return null;
300                 return new Boolean JavaDoc(target.getVisibleTotals());
301             }
302             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
303                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
304             {
305                 try {
306                     ReportView target = (ReportView) object;
307                     // if null, use delete method for optional primitives
308
if (value == null) {
309                         target.deleteVisibleTotals();
310                         return;
311                     }
312                     target.setVisibleTotals( ((Boolean JavaDoc)value).booleanValue());
313                 }
314                 catch (java.lang.Exception JavaDoc ex) {
315                     throw new IllegalStateException JavaDoc(ex.toString());
316                 }
317             }
318             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
319                 return null;
320             }
321         } );
322         desc.setHandler(handler);
323         addFieldDescriptor(desc);
324         
325         //-- validation code for: _visibleTotals
326
fieldValidator = new org.exolab.castor.xml.FieldValidator();
327         { //-- local scope
328
BooleanValidator typeValidator = new BooleanValidator();
329             fieldValidator.setValidator(typeValidator);
330         }
331         desc.setValidator(fieldValidator);
332         //-- _default
333
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_default", "Default", org.exolab.castor.xml.NodeType.Attribute);
334         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
335             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
336                 throws IllegalStateException JavaDoc
337             {
338                 ReportView target = (ReportView) object;
339                 if(!target.hasDefault())
340                     return null;
341                 return new Boolean JavaDoc(target.getDefault());
342             }
343             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
344                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
345             {
346                 try {
347                     ReportView target = (ReportView) object;
348                     // if null, use delete method for optional primitives
349
if (value == null) {
350                         target.deleteDefault();
351                         return;
352                     }
353                     target.setDefault( ((Boolean JavaDoc)value).booleanValue());
354                 }
355                 catch (java.lang.Exception JavaDoc ex) {
356                     throw new IllegalStateException JavaDoc(ex.toString());
357                 }
358             }
359             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
360                 return null;
361             }
362         } );
363         desc.setHandler(handler);
364         addFieldDescriptor(desc);
365         
366         //-- validation code for: _default
367
fieldValidator = new org.exolab.castor.xml.FieldValidator();
368         { //-- local scope
369
BooleanValidator typeValidator = new BooleanValidator();
370             fieldValidator.setValidator(typeValidator);
371         }
372         desc.setValidator(fieldValidator);
373         //-- initialize element descriptors
374

375         //-- _viewParameterValues
376
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.ViewParameterValues.class, "_viewParameterValues", "ViewParameterValues", org.exolab.castor.xml.NodeType.Element);
377         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
378             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
379                 throws IllegalStateException JavaDoc
380             {
381                 ReportView target = (ReportView) object;
382                 return target.getViewParameterValues();
383             }
384             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
385                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
386             {
387                 try {
388                     ReportView target = (ReportView) object;
389                     target.setViewParameterValues( (com.calipso.reportgenerator.reportdefinitions.ViewParameterValues) value);
390                 }
391                 catch (java.lang.Exception JavaDoc ex) {
392                     throw new IllegalStateException JavaDoc(ex.toString());
393                 }
394             }
395             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
396                 return new com.calipso.reportgenerator.reportdefinitions.ViewParameterValues();
397             }
398         } );
399         desc.setHandler(handler);
400         desc.setMultivalued(false);
401         addFieldDescriptor(desc);
402         
403         //-- validation code for: _viewParameterValues
404
fieldValidator = new org.exolab.castor.xml.FieldValidator();
405         { //-- local scope
406
}
407         desc.setValidator(fieldValidator);
408         //-- _dimensionProperties
409
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.DimensionProperties.class, "_dimensionProperties", "DimensionProperties", org.exolab.castor.xml.NodeType.Element);
410         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
411             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
412                 throws IllegalStateException JavaDoc
413             {
414                 ReportView target = (ReportView) object;
415                 return target.getDimensionProperties();
416             }
417             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
418                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
419             {
420                 try {
421                     ReportView target = (ReportView) object;
422                     target.setDimensionProperties( (com.calipso.reportgenerator.reportdefinitions.DimensionProperties) value);
423                 }
424                 catch (java.lang.Exception JavaDoc ex) {
425                     throw new IllegalStateException JavaDoc(ex.toString());
426                 }
427             }
428             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
429                 return new com.calipso.reportgenerator.reportdefinitions.DimensionProperties();
430             }
431         } );
432         desc.setHandler(handler);
433         desc.setMultivalued(false);
434         addFieldDescriptor(desc);
435         
436         //-- validation code for: _dimensionProperties
437
fieldValidator = new org.exolab.castor.xml.FieldValidator();
438         { //-- local scope
439
}
440         desc.setValidator(fieldValidator);
441         //-- _metricProperties
442
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.MetricProperties.class, "_metricProperties", "MetricProperties", org.exolab.castor.xml.NodeType.Element);
443         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
444             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
445                 throws IllegalStateException JavaDoc
446             {
447                 ReportView target = (ReportView) object;
448                 return target.getMetricProperties();
449             }
450             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
451                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
452             {
453                 try {
454                     ReportView target = (ReportView) object;
455                     target.setMetricProperties( (com.calipso.reportgenerator.reportdefinitions.MetricProperties) value);
456                 }
457                 catch (java.lang.Exception JavaDoc ex) {
458                     throw new IllegalStateException JavaDoc(ex.toString());
459                 }
460             }
461             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
462                 return new com.calipso.reportgenerator.reportdefinitions.MetricProperties();
463             }
464         } );
465         desc.setHandler(handler);
466         desc.setMultivalued(false);
467         addFieldDescriptor(desc);
468         
469         //-- validation code for: _metricProperties
470
fieldValidator = new org.exolab.castor.xml.FieldValidator();
471         { //-- local scope
472
}
473         desc.setValidator(fieldValidator);
474         //-- _lightBoxer
475
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.LightBoxer.class, "_lightBoxer", "LightBoxer", org.exolab.castor.xml.NodeType.Element);
476         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
477             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
478                 throws IllegalStateException JavaDoc
479             {
480                 ReportView target = (ReportView) object;
481                 return target.getLightBoxer();
482             }
483             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
484                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
485             {
486                 try {
487                     ReportView target = (ReportView) object;
488                     target.setLightBoxer( (com.calipso.reportgenerator.reportdefinitions.LightBoxer) value);
489                 }
490                 catch (java.lang.Exception JavaDoc ex) {
491                     throw new IllegalStateException JavaDoc(ex.toString());
492                 }
493             }
494             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
495                 return new com.calipso.reportgenerator.reportdefinitions.LightBoxer();
496             }
497         } );
498         desc.setHandler(handler);
499         desc.setMultivalued(false);
500         addFieldDescriptor(desc);
501         
502         //-- validation code for: _lightBoxer
503
fieldValidator = new org.exolab.castor.xml.FieldValidator();
504         { //-- local scope
505
}
506         desc.setValidator(fieldValidator);
507     } //-- com.calipso.reportgenerator.reportdefinitions.ReportViewDescriptor()
508

509
510       //-----------/
511
//- Methods -/
512
//-----------/
513

514     /**
515      * Method getAccessMode
516      */

517     public org.exolab.castor.mapping.AccessMode getAccessMode()
518     {
519         return null;
520     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
521

522     /**
523      * Method getExtends
524      */

525     public org.exolab.castor.mapping.ClassDescriptor getExtends()
526     {
527         return null;
528     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
529

530     /**
531      * Method getIdentity
532      */

533     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
534     {
535         return identity;
536     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
537

538     /**
539      * Method getJavaClass
540      */

541     public java.lang.Class JavaDoc getJavaClass()
542     {
543         return com.calipso.reportgenerator.reportdefinitions.ReportView.class;
544     } //-- java.lang.Class getJavaClass()
545

546     /**
547      * Method getNameSpacePrefix
548      */

549     public java.lang.String JavaDoc getNameSpacePrefix()
550     {
551         return nsPrefix;
552     } //-- java.lang.String getNameSpacePrefix()
553

554     /**
555      * Method getNameSpaceURI
556      */

557     public java.lang.String JavaDoc getNameSpaceURI()
558     {
559         return nsURI;
560     } //-- java.lang.String getNameSpaceURI()
561

562     /**
563      * Method getValidator
564      */

565     public org.exolab.castor.xml.TypeValidator getValidator()
566     {
567         return this;
568     } //-- org.exolab.castor.xml.TypeValidator getValidator()
569

570     /**
571      * Method getXMLName
572      */

573     public java.lang.String JavaDoc getXMLName()
574     {
575         return xmlName;
576     } //-- java.lang.String getXMLName()
577

578 }
579
Popular Tags