KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportdefinitions > types > DrillDownDefinitionTypeType


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.types;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
12
//---------------------------------/
13

14 import java.io.Serializable JavaDoc;
15 import java.util.Enumeration JavaDoc;
16 import java.util.Hashtable JavaDoc;
17 import org.exolab.castor.xml.Marshaller;
18 import org.exolab.castor.xml.Unmarshaller;
19
20 /**
21  * Class DrillDownDefinitionTypeType.
22  *
23  * @version $Revision$ $Date$
24  */

25 public class DrillDownDefinitionTypeType implements java.io.Serializable JavaDoc {
26
27
28       //--------------------------/
29
//- Class/Member Variables -/
30
//--------------------------/
31

32     /**
33      * The CUBE type
34      */

35     public static final int CUBE_TYPE = 0;
36
37     /**
38      * The instance of the CUBE type
39      */

40     public static final DrillDownDefinitionTypeType CUBE = new DrillDownDefinitionTypeType(CUBE_TYPE, "CUBE");
41
42     /**
43      * The MICROREPORT type
44      */

45     public static final int MICROREPORT_TYPE = 1;
46
47     /**
48      * The instance of the MICROREPORT type
49      */

50     public static final DrillDownDefinitionTypeType MICROREPORT = new DrillDownDefinitionTypeType(MICROREPORT_TYPE, "MICROREPORT");
51
52     /**
53      * The STATICWEB type
54      */

55     public static final int STATICWEB_TYPE = 2;
56
57     /**
58      * The instance of the STATICWEB type
59      */

60     public static final DrillDownDefinitionTypeType STATICWEB = new DrillDownDefinitionTypeType(STATICWEB_TYPE, "STATICWEB");
61
62     /**
63      * Field _memberTable
64      */

65     private static java.util.Hashtable JavaDoc _memberTable = init();
66
67     /**
68      * Field type
69      */

70     private int type = -1;
71
72     /**
73      * Field stringValue
74      */

75     private java.lang.String JavaDoc stringValue = null;
76
77
78       //----------------/
79
//- Constructors -/
80
//----------------/
81

82     private DrillDownDefinitionTypeType(int type, java.lang.String JavaDoc value) {
83         super();
84         this.type = type;
85         this.stringValue = value;
86     } //-- com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType(int, java.lang.String)
87

88
89       //-----------/
90
//- Methods -/
91
//-----------/
92

93     /**
94      * Method enumerateReturns an enumeration of all possible
95      * instances of DrillDownDefinitionTypeType
96      */

97     public static java.util.Enumeration JavaDoc enumerate()
98     {
99         return _memberTable.elements();
100     } //-- java.util.Enumeration enumerate()
101

102     /**
103      * Method getTypeReturns the type of this
104      * DrillDownDefinitionTypeType
105      */

106     public int getType()
107     {
108         return this.type;
109     } //-- int getType()
110

111     /**
112      * Method init
113      */

114     private static java.util.Hashtable JavaDoc init()
115     {
116         Hashtable JavaDoc members = new Hashtable JavaDoc();
117         members.put("CUBE", CUBE);
118         members.put("MICROREPORT", MICROREPORT);
119         members.put("STATICWEB", STATICWEB);
120         return members;
121     } //-- java.util.Hashtable init()
122

123     /**
124      * Method toStringReturns the String representation of this
125      * DrillDownDefinitionTypeType
126      */

127     public java.lang.String JavaDoc toString()
128     {
129         return this.stringValue;
130     } //-- java.lang.String toString()
131

132     /**
133      * Method valueOfReturns a new DrillDownDefinitionTypeType
134      * based on the given String value.
135      *
136      * @param string
137      */

138     public static com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType valueOf(java.lang.String JavaDoc string)
139     {
140         java.lang.Object JavaDoc obj = null;
141         if (string != null) obj = _memberTable.get(string);
142         if (obj == null) {
143             String JavaDoc err = "'" + string + "' is not a valid DrillDownDefinitionTypeType";
144             throw new IllegalArgumentException JavaDoc(err);
145         }
146         return (DrillDownDefinitionTypeType) obj;
147     } //-- com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType valueOf(java.lang.String)
148

149 }
150
Popular Tags