KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

32     /**
33      * The A type
34      */

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

40     public static final DimensionPropertyOrderType A = new DimensionPropertyOrderType(A_TYPE, "A");
41
42     /**
43      * The D type
44      */

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

50     public static final DimensionPropertyOrderType D = new DimensionPropertyOrderType(D_TYPE, "D");
51
52     /**
53      * Field _memberTable
54      */

55     private static java.util.Hashtable JavaDoc _memberTable = init();
56
57     /**
58      * Field type
59      */

60     private int type = -1;
61
62     /**
63      * Field stringValue
64      */

65     private java.lang.String JavaDoc stringValue = null;
66
67
68       //----------------/
69
//- Constructors -/
70
//----------------/
71

72     private DimensionPropertyOrderType(int type, java.lang.String JavaDoc value) {
73         super();
74         this.type = type;
75         this.stringValue = value;
76     } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType(int, java.lang.String)
77

78
79       //-----------/
80
//- Methods -/
81
//-----------/
82

83     /**
84      * Method enumerateReturns an enumeration of all possible
85      * instances of DimensionPropertyOrderType
86      */

87     public static java.util.Enumeration JavaDoc enumerate()
88     {
89         return _memberTable.elements();
90     } //-- java.util.Enumeration enumerate()
91

92     /**
93      * Method getTypeReturns the type of this
94      * DimensionPropertyOrderType
95      */

96     public int getType()
97     {
98         return this.type;
99     } //-- int getType()
100

101     /**
102      * Method init
103      */

104     private static java.util.Hashtable JavaDoc init()
105     {
106         Hashtable JavaDoc members = new Hashtable JavaDoc();
107         members.put("A", A);
108         members.put("D", D);
109         return members;
110     } //-- java.util.Hashtable init()
111

112     /**
113      * Method toStringReturns the String representation of this
114      * DimensionPropertyOrderType
115      */

116     public java.lang.String JavaDoc toString()
117     {
118         return this.stringValue;
119     } //-- java.lang.String toString()
120

121     /**
122      * Method valueOfReturns a new DimensionPropertyOrderType based
123      * on the given String value.
124      *
125      * @param string
126      */

127     public static com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType valueOf(java.lang.String JavaDoc string)
128     {
129         java.lang.Object JavaDoc obj = null;
130         if (string != null) obj = _memberTable.get(string);
131         if (obj == null) {
132             String JavaDoc err = "'" + string + "' is not a valid DimensionPropertyOrderType";
133             throw new IllegalArgumentException JavaDoc(err);
134         }
135         return (DimensionPropertyOrderType) obj;
136     } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType valueOf(java.lang.String)
137

138 }
139
Popular Tags