KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

32     /**
33      * The PAGE type
34      */

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

40     public static final DimensionDefinitionLocationType PAGE = new DimensionDefinitionLocationType(PAGE_TYPE, "PAGE");
41
42     /**
43      * The ROW type
44      */

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

50     public static final DimensionDefinitionLocationType ROW = new DimensionDefinitionLocationType(ROW_TYPE, "ROW");
51
52     /**
53      * The COLUMN type
54      */

55     public static final int COLUMN_TYPE = 2;
56
57     /**
58      * The instance of the COLUMN type
59      */

60     public static final DimensionDefinitionLocationType COLUMN = new DimensionDefinitionLocationType(COLUMN_TYPE, "COLUMN");
61
62     /**
63      * The HIDDEN type
64      */

65     public static final int HIDDEN_TYPE = 3;
66
67     /**
68      * The instance of the HIDDEN type
69      */

70     public static final DimensionDefinitionLocationType HIDDEN = new DimensionDefinitionLocationType(HIDDEN_TYPE, "HIDDEN");
71
72     /**
73      * Field _memberTable
74      */

75     private static java.util.Hashtable JavaDoc _memberTable = init();
76
77     /**
78      * Field type
79      */

80     private int type = -1;
81
82     /**
83      * Field stringValue
84      */

85     private java.lang.String JavaDoc stringValue = null;
86
87
88       //----------------/
89
//- Constructors -/
90
//----------------/
91

92     private DimensionDefinitionLocationType(int type, java.lang.String JavaDoc value) {
93         super();
94         this.type = type;
95         this.stringValue = value;
96     } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType(int, java.lang.String)
97

98
99       //-----------/
100
//- Methods -/
101
//-----------/
102

103     /**
104      * Method enumerateReturns an enumeration of all possible
105      * instances of DimensionDefinitionLocationType
106      */

107     public static java.util.Enumeration JavaDoc enumerate()
108     {
109         return _memberTable.elements();
110     } //-- java.util.Enumeration enumerate()
111

112     /**
113      * Method getTypeReturns the type of this
114      * DimensionDefinitionLocationType
115      */

116     public int getType()
117     {
118         return this.type;
119     } //-- int getType()
120

121     /**
122      * Method init
123      */

124     private static java.util.Hashtable JavaDoc init()
125     {
126         Hashtable JavaDoc members = new Hashtable JavaDoc();
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 JavaDoc toString()
139     {
140         return this.stringValue;
141     } //-- java.lang.String toString()
142

143     /**
144      * Method valueOfReturns a new DimensionDefinitionLocationType
145      * based on the given String value.
146      *
147      * @param string
148      */

149     public static com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType valueOf(java.lang.String JavaDoc string)
150     {
151         java.lang.Object JavaDoc obj = null;
152         if (string != null) obj = _memberTable.get(string);
153         if (obj == null) {
154             String JavaDoc err = "'" + string + "' is not a valid DimensionDefinitionLocationType";
155             throw new IllegalArgumentException JavaDoc(err);
156         }
157         return (DimensionDefinitionLocationType) obj;
158     } //-- com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType valueOf(java.lang.String)
159

160 }
161
Popular Tags