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 DimensionPropertyLocationType implements java.io.Serializable { 26 27 28 32 35 public static final int PAGE_TYPE = 0; 36 37 40 public static final DimensionPropertyLocationType PAGE = new DimensionPropertyLocationType(PAGE_TYPE, "PAGE"); 41 42 45 public static final int COLUMN_TYPE = 1; 46 47 50 public static final DimensionPropertyLocationType COLUMN = new DimensionPropertyLocationType(COLUMN_TYPE, "COLUMN"); 51 52 55 public static final int ROW_TYPE = 2; 56 57 60 public static final DimensionPropertyLocationType ROW = new DimensionPropertyLocationType(ROW_TYPE, "ROW"); 61 62 65 private static java.util.Hashtable _memberTable = init(); 66 67 70 private int type = -1; 71 72 75 private java.lang.String stringValue = null; 76 77 78 82 private DimensionPropertyLocationType(int type, java.lang.String value) { 83 super(); 84 this.type = type; 85 this.stringValue = value; 86 } 88 89 93 97 public static java.util.Enumeration enumerate() 98 { 99 return _memberTable.elements(); 100 } 102 106 public int getType() 107 { 108 return this.type; 109 } 111 114 private static java.util.Hashtable init() 115 { 116 Hashtable members = new Hashtable (); 117 members.put("PAGE", PAGE); 118 members.put("COLUMN", COLUMN); 119 members.put("ROW", ROW); 120 return members; 121 } 123 127 public java.lang.String toString() 128 { 129 return this.stringValue; 130 } 132 138 public static com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType valueOf(java.lang.String string) 139 { 140 java.lang.Object obj = null; 141 if (string != null) obj = _memberTable.get(string); 142 if (obj == null) { 143 String err = "'" + string + "' is not a valid DimensionPropertyLocationType"; 144 throw new IllegalArgumentException (err); 145 } 146 return (DimensionPropertyLocationType) obj; 147 } 149 } 150 | Popular Tags |