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