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 DrillDownDefinitionTypeType.
022: *
023: * @version $Revision$ $Date$
024: */
025: public class DrillDownDefinitionTypeType implements
026: java.io.Serializable {
027:
028: //--------------------------/
029: //- Class/Member Variables -/
030: //--------------------------/
031:
032: /**
033: * The CUBE type
034: */
035: public static final int CUBE_TYPE = 0;
036:
037: /**
038: * The instance of the CUBE type
039: */
040: public static final DrillDownDefinitionTypeType CUBE = new DrillDownDefinitionTypeType(
041: CUBE_TYPE, "CUBE");
042:
043: /**
044: * The MICROREPORT type
045: */
046: public static final int MICROREPORT_TYPE = 1;
047:
048: /**
049: * The instance of the MICROREPORT type
050: */
051: public static final DrillDownDefinitionTypeType MICROREPORT = new DrillDownDefinitionTypeType(
052: MICROREPORT_TYPE, "MICROREPORT");
053:
054: /**
055: * The STATICWEB type
056: */
057: public static final int STATICWEB_TYPE = 2;
058:
059: /**
060: * The instance of the STATICWEB type
061: */
062: public static final DrillDownDefinitionTypeType STATICWEB = new DrillDownDefinitionTypeType(
063: STATICWEB_TYPE, "STATICWEB");
064:
065: /**
066: * Field _memberTable
067: */
068: private static java.util.Hashtable _memberTable = init();
069:
070: /**
071: * Field type
072: */
073: private int type = -1;
074:
075: /**
076: * Field stringValue
077: */
078: private java.lang.String stringValue = null;
079:
080: //----------------/
081: //- Constructors -/
082: //----------------/
083:
084: private DrillDownDefinitionTypeType(int type, java.lang.String value) {
085: super ();
086: this .type = type;
087: this .stringValue = value;
088: } //-- com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType(int, java.lang.String)
089:
090: //-----------/
091: //- Methods -/
092: //-----------/
093:
094: /**
095: * Method enumerateReturns an enumeration of all possible
096: * instances of DrillDownDefinitionTypeType
097: */
098: public static java.util.Enumeration enumerate() {
099: 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: return this .type;
108: } //-- int getType()
109:
110: /**
111: * Method init
112: */
113: private static java.util.Hashtable init() {
114: Hashtable members = new Hashtable();
115: members.put("CUBE", CUBE);
116: members.put("MICROREPORT", MICROREPORT);
117: members.put("STATICWEB", STATICWEB);
118: return members;
119: } //-- java.util.Hashtable init()
120:
121: /**
122: * Method toStringReturns the String representation of this
123: * DrillDownDefinitionTypeType
124: */
125: public java.lang.String toString() {
126: return this .stringValue;
127: } //-- java.lang.String toString()
128:
129: /**
130: * Method valueOfReturns a new DrillDownDefinitionTypeType
131: * based on the given String value.
132: *
133: * @param string
134: */
135: public static com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType valueOf(
136: java.lang.String string) {
137: java.lang.Object obj = null;
138: if (string != null)
139: obj = _memberTable.get(string);
140: if (obj == null) {
141: String err = "'" + string
142: + "' is not a valid DrillDownDefinitionTypeType";
143: throw new IllegalArgumentException(err);
144: }
145: return (DrillDownDefinitionTypeType) obj;
146: } //-- com.calipso.reportgenerator.reportdefinitions.types.DrillDownDefinitionTypeType valueOf(java.lang.String)
147:
148: }
|