1 7 8 package com.calipso.reportgenerator.reportdefinitions.types; 9 10 14 import java.io.Serializable ; 15 import java.util.Enumeration ; 16 import java.util.Hashtable ; 17 import org.exolab.castor.xml.Marshaller; 18 import org.exolab.castor.xml.Unmarshaller; 19 20 25 public class DimensionPropertyOrderType implements java.io.Serializable { 26 27 28 32 35 public static final int A_TYPE = 0; 36 37 40 public static final DimensionPropertyOrderType A = new DimensionPropertyOrderType(A_TYPE, "A"); 41 42 45 public static final int D_TYPE = 1; 46 47 50 public static final DimensionPropertyOrderType D = new DimensionPropertyOrderType(D_TYPE, "D"); 51 52 55 private static java.util.Hashtable _memberTable = init(); 56 57 60 private int type = -1; 61 62 65 private java.lang.String stringValue = null; 66 67 68 72 private DimensionPropertyOrderType(int type, java.lang.String value) { 73 super(); 74 this.type = type; 75 this.stringValue = value; 76 } 78 79 83 87 public static java.util.Enumeration enumerate() 88 { 89 return _memberTable.elements(); 90 } 92 96 public int getType() 97 { 98 return this.type; 99 } 101 104 private static java.util.Hashtable init() 105 { 106 Hashtable members = new Hashtable (); 107 members.put("A", A); 108 members.put("D", D); 109 return members; 110 } 112 116 public java.lang.String toString() 117 { 118 return this.stringValue; 119 } 121 127 public static com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType valueOf(java.lang.String string) 128 { 129 java.lang.Object obj = null; 130 if (string != null) obj = _memberTable.get(string); 131 if (obj == null) { 132 String err = "'" + string + "' is not a valid DimensionPropertyOrderType"; 133 throw new IllegalArgumentException (err); 134 } 135 return (DimensionPropertyOrderType) obj; 136 } 138 } 139 | Popular Tags |