001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
004: * Schema.
005: * $Id$
006: */
007:
008: package com.calipso.reportgenerator.reportdefinitions.types;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import java.io.Serializable;
015: import java.util.Enumeration;
016: import java.util.Hashtable;
017: import org.exolab.castor.xml.Marshaller;
018: import org.exolab.castor.xml.Unmarshaller;
019:
020: /**
021: * Class DataSourceDefinitionSourceTypeType.
022: *
023: * @version $Revision$ $Date$
024: */
025: public class DataSourceDefinitionSourceTypeType implements
026: java.io.Serializable {
027:
028: //--------------------------/
029: //- Class/Member Variables -/
030: //--------------------------/
031:
032: /**
033: * The SQL type
034: */
035: public static final int SQL_TYPE = 0;
036:
037: /**
038: * The instance of the SQL type
039: */
040: public static final DataSourceDefinitionSourceTypeType SQL = new DataSourceDefinitionSourceTypeType(
041: SQL_TYPE, "SQL");
042:
043: /**
044: * The XML type
045: */
046: public static final int XML_TYPE = 1;
047:
048: /**
049: * The instance of the XML type
050: */
051: public static final DataSourceDefinitionSourceTypeType XML = new DataSourceDefinitionSourceTypeType(
052: XML_TYPE, "XML");
053:
054: /**
055: * The BDLQL type
056: */
057: public static final int BDLQL_TYPE = 2;
058:
059: /**
060: * The instance of the BDLQL type
061: */
062: public static final DataSourceDefinitionSourceTypeType BDLQL = new DataSourceDefinitionSourceTypeType(
063: BDLQL_TYPE, "BDLQL");
064:
065: /**
066: * The EXT type
067: */
068: public static final int EXT_TYPE = 3;
069:
070: /**
071: * The instance of the EXT type
072: */
073: public static final DataSourceDefinitionSourceTypeType EXT = new DataSourceDefinitionSourceTypeType(
074: EXT_TYPE, "EXT");
075:
076: /**
077: * The OQL type
078: */
079: public static final int OQL_TYPE = 4;
080:
081: /**
082: * The instance of the OQL type
083: */
084: public static final DataSourceDefinitionSourceTypeType OQL = new DataSourceDefinitionSourceTypeType(
085: OQL_TYPE, "OQL");
086:
087: /**
088: * The CALC type
089: */
090: public static final int CALC_TYPE = 5;
091:
092: /**
093: * The instance of the CALC type
094: */
095: public static final DataSourceDefinitionSourceTypeType CALC = new DataSourceDefinitionSourceTypeType(
096: CALC_TYPE, "CALC");
097:
098: /**
099: * The EXCEL type
100: */
101: public static final int EXCEL_TYPE = 6;
102:
103: /**
104: * The instance of the EXCEL type
105: */
106: public static final DataSourceDefinitionSourceTypeType EXCEL = new DataSourceDefinitionSourceTypeType(
107: EXCEL_TYPE, "EXCEL");
108:
109: /**
110: * Field _memberTable
111: */
112: private static java.util.Hashtable _memberTable = init();
113:
114: /**
115: * Field type
116: */
117: private int type = -1;
118:
119: /**
120: * Field stringValue
121: */
122: private java.lang.String stringValue = null;
123:
124: //----------------/
125: //- Constructors -/
126: //----------------/
127:
128: private DataSourceDefinitionSourceTypeType(int type,
129: java.lang.String value) {
130: super ();
131: this .type = type;
132: this .stringValue = value;
133: } //-- com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType(int, java.lang.String)
134:
135: //-----------/
136: //- Methods -/
137: //-----------/
138:
139: /**
140: * Method enumerateReturns an enumeration of all possible
141: * instances of DataSourceDefinitionSourceTypeType
142: */
143: public static java.util.Enumeration enumerate() {
144: return _memberTable.elements();
145: } //-- java.util.Enumeration enumerate()
146:
147: /**
148: * Method getTypeReturns the type of this
149: * DataSourceDefinitionSourceTypeType
150: */
151: public int getType() {
152: return this .type;
153: } //-- int getType()
154:
155: /**
156: * Method init
157: */
158: private static java.util.Hashtable init() {
159: Hashtable members = new Hashtable();
160: members.put("SQL", SQL);
161: members.put("XML", XML);
162: members.put("BDLQL", BDLQL);
163: members.put("EXT", EXT);
164: members.put("OQL", OQL);
165: members.put("CALC", CALC);
166: members.put("EXCEL", EXCEL);
167: return members;
168: } //-- java.util.Hashtable init()
169:
170: /**
171: * Method toStringReturns the String representation of this
172: * DataSourceDefinitionSourceTypeType
173: */
174: public java.lang.String toString() {
175: return this .stringValue;
176: } //-- java.lang.String toString()
177:
178: /**
179: * Method valueOfReturns a new
180: * DataSourceDefinitionSourceTypeType based on the given String
181: * value.
182: *
183: * @param string
184: */
185: public static com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType valueOf(
186: java.lang.String string) {
187: java.lang.Object obj = null;
188: if (string != null)
189: obj = _memberTable.get(string);
190: if (obj == null) {
191: String err = "'"
192: + string
193: + "' is not a valid DataSourceDefinitionSourceTypeType";
194: throw new IllegalArgumentException(err);
195: }
196: return (DataSourceDefinitionSourceTypeType) obj;
197: } //-- com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType valueOf(java.lang.String)
198:
199: }
|