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