1 package net.sf.sapjcosupport;
2
3 import org.apache.commons.lang.enums.Enum;
4
5 /**
6 * @author Niki Driessen
7 * @since Jan 23, 2006 - 11:08:45 AM
8 */
9 public class SapType extends Enum {
10 public static final SapType String = new SapType("String");
11 public static final SapType Double = new SapType("Double");
12 public static final SapType Int = new SapType("Int");
13 public static final SapType Date = new SapType("Date");
14
15 private SapType(String string) {
16 super(string);
17 }
18
19 public static SapType getEnum(String name){
20 return (SapType) getEnumMap(SapType.class).get(decentName(name));
21 }
22
23 private static String decentName(String name){
24 return new StringBuffer(name.substring(0,1).toUpperCase()).append(name.substring(1).toLowerCase()).toString();
25 }
26 }