KickJava   Java API By Example, From Geeks To Geeks.

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


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 DataSourceDefinitionSourceTypeType.
22  *
23  * @version $Revision$ $Date$
24  */

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

32     /**
33      * The SQL type
34      */

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

40     public static final DataSourceDefinitionSourceTypeType SQL = new DataSourceDefinitionSourceTypeType(SQL_TYPE, "SQL");
41
42     /**
43      * The XML type
44      */

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

50     public static final DataSourceDefinitionSourceTypeType XML = new DataSourceDefinitionSourceTypeType(XML_TYPE, "XML");
51
52     /**
53      * The BDLQL type
54      */

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

60     public static final DataSourceDefinitionSourceTypeType BDLQL = new DataSourceDefinitionSourceTypeType(BDLQL_TYPE, "BDLQL");
61
62     /**
63      * The EXT type
64      */

65     public static final int EXT_TYPE = 3;
66
67     /**
68      * The instance of the EXT type
69      */

70     public static final DataSourceDefinitionSourceTypeType EXT = new DataSourceDefinitionSourceTypeType(EXT_TYPE, "EXT");
71
72     /**
73      * The OQL type
74      */

75     public static final int OQL_TYPE = 4;
76
77     /**
78      * The instance of the OQL type
79      */

80     public static final DataSourceDefinitionSourceTypeType OQL = new DataSourceDefinitionSourceTypeType(OQL_TYPE, "OQL");
81
82     /**
83      * The CALC type
84      */

85     public static final int CALC_TYPE = 5;
86
87     /**
88      * The instance of the CALC type
89      */

90     public static final DataSourceDefinitionSourceTypeType CALC = new DataSourceDefinitionSourceTypeType(CALC_TYPE, "CALC");
91
92     /**
93      * The EXCEL type
94      */

95     public static final int EXCEL_TYPE = 6;
96
97     /**
98      * The instance of the EXCEL type
99      */

100     public static final DataSourceDefinitionSourceTypeType EXCEL = new DataSourceDefinitionSourceTypeType(EXCEL_TYPE, "EXCEL");
101
102     /**
103      * Field _memberTable
104      */

105     private static java.util.Hashtable JavaDoc _memberTable = init();
106
107     /**
108      * Field type
109      */

110     private int type = -1;
111
112     /**
113      * Field stringValue
114      */

115     private java.lang.String JavaDoc stringValue = null;
116
117
118       //----------------/
119
//- Constructors -/
120
//----------------/
121

122     private DataSourceDefinitionSourceTypeType(int type, java.lang.String JavaDoc value) {
123         super();
124         this.type = type;
125         this.stringValue = value;
126     } //-- com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType(int, java.lang.String)
127

128
129       //-----------/
130
//- Methods -/
131
//-----------/
132

133     /**
134      * Method enumerateReturns an enumeration of all possible
135      * instances of DataSourceDefinitionSourceTypeType
136      */

137     public static java.util.Enumeration JavaDoc enumerate()
138     {
139         return _memberTable.elements();
140     } //-- java.util.Enumeration enumerate()
141

142     /**
143      * Method getTypeReturns the type of this
144      * DataSourceDefinitionSourceTypeType
145      */

146     public int getType()
147     {
148         return this.type;
149     } //-- int getType()
150

151     /**
152      * Method init
153      */

154     private static java.util.Hashtable JavaDoc init()
155     {
156         Hashtable JavaDoc members = new Hashtable JavaDoc();
157         members.put("SQL", SQL);
158         members.put("XML", XML);
159         members.put("BDLQL", BDLQL);
160         members.put("EXT", EXT);
161         members.put("OQL", OQL);
162         members.put("CALC", CALC);
163         members.put("EXCEL", EXCEL);
164         return members;
165     } //-- java.util.Hashtable init()
166

167     /**
168      * Method toStringReturns the String representation of this
169      * DataSourceDefinitionSourceTypeType
170      */

171     public java.lang.String JavaDoc toString()
172     {
173         return this.stringValue;
174     } //-- java.lang.String toString()
175

176     /**
177      * Method valueOfReturns a new
178      * DataSourceDefinitionSourceTypeType based on the given String
179      * value.
180      *
181      * @param string
182      */

183     public static com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType valueOf(java.lang.String JavaDoc string)
184     {
185         java.lang.Object JavaDoc obj = null;
186         if (string != null) obj = _memberTable.get(string);
187         if (obj == null) {
188             String JavaDoc err = "'" + string + "' is not a valid DataSourceDefinitionSourceTypeType";
189             throw new IllegalArgumentException JavaDoc(err);
190         }
191         return (DataSourceDefinitionSourceTypeType) obj;
192     } //-- com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType valueOf(java.lang.String)
193

194 }
195
Popular Tags