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 LightBoxDefinitionParameterType implements java.io.Serializable { 26 27 28 32 35 public static final int FROM_TYPE = 0; 36 37 40 public static final LightBoxDefinitionParameterType FROM = new LightBoxDefinitionParameterType(FROM_TYPE, "FROM"); 41 42 45 public static final int TO_TYPE = 1; 46 47 50 public static final LightBoxDefinitionParameterType TO = new LightBoxDefinitionParameterType(TO_TYPE, "TO"); 51 52 55 public static final int VALUE_TYPE = 2; 56 57 60 public static final LightBoxDefinitionParameterType VALUE = new LightBoxDefinitionParameterType(VALUE_TYPE, "VALUE"); 61 62 65 public static final int VALUES_TYPE = 3; 66 67 70 public static final LightBoxDefinitionParameterType VALUES = new LightBoxDefinitionParameterType(VALUES_TYPE, "VALUES"); 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 LightBoxDefinitionParameterType(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("FROM", FROM); 128 members.put("TO", TO); 129 members.put("VALUE", VALUE); 130 members.put("VALUES", VALUES); 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.LightBoxDefinitionParameterType 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 LightBoxDefinitionParameterType"; 155 throw new IllegalArgumentException (err); 156 } 157 return (LightBoxDefinitionParameterType) obj; 158 } 160 } 161 | Popular Tags |