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 DimensionDefinitionLocationType implements java.io.Serializable { 26 27 28 32 35 public static final int PAGE_TYPE = 0; 36 37 40 public static final DimensionDefinitionLocationType PAGE = new DimensionDefinitionLocationType(PAGE_TYPE, "PAGE"); 41 42 45 public static final int ROW_TYPE = 1; 46 47 50 public static final DimensionDefinitionLocationType ROW = new DimensionDefinitionLocationType(ROW_TYPE, "ROW"); 51 52 55 public static final int COLUMN_TYPE = 2; 56 57 60 public static final DimensionDefinitionLocationType COLUMN = new DimensionDefinitionLocationType(COLUMN_TYPE, "COLUMN"); 61 62 65 public static final int HIDDEN_TYPE = 3; 66 67 70 public static final DimensionDefinitionLocationType HIDDEN = new DimensionDefinitionLocationType(HIDDEN_TYPE, "HIDDEN"); 71 72 75 private static java.util.Hashtable _memberTable = init(); 76 77 80 private int type = -1; 81 82 85 private java.lang.String stringValue = null; 86 87 88 92 private DimensionDefinitionLocationType(int type, java.lang.String value) { 93 super(); 94 this.type = type; 95 this.stringValue = value; 96 } 98 99 103 107 public static java.util.Enumeration enumerate() 108 { 109 return _memberTable.elements(); 110 } 112 116 public int getType() 117 { 118 return this.type; 119 } 121 124 private static java.util.Hashtable init() 125 { 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 } 134 138 public java.lang.String toString() 139 { 140 return this.stringValue; 141 } 143 149 public static com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType valueOf(java.lang.String string) 150 { 151 java.lang.Object obj = null; 152 if (string != null) obj = _memberTable.get(string); 153 if (obj == null) { 154 String err = "'" + string + "' is not a valid DimensionDefinitionLocationType"; 155 throw new IllegalArgumentException (err); 156 } 157 return (DimensionDefinitionLocationType) obj; 158 } 160 } 161 | Popular Tags |