1 26 27 package org.objectweb.openccm.pss.runtime.hibernate.lib; 28 29 import net.sf.hibernate.type.Type; 30 31 38 39 public class TypeMapping 40 { 41 public static final java.util.Map mapping = new java.util.HashMap (); 42 43 static 44 { 45 mapping.put("String", new net.sf.hibernate.type.StringType()); 46 } 47 48 public static Type toType(final String type) 49 { 50 return (Type) mapping.get(type); 51 } 52 53 public static Type[] toTypes(final String [] types) 54 { 55 Type[] result = new Type[types.length]; 56 for (int i=0; i<types.length; i++) { 57 result[i] = TypeMapping.toType(types[i]); 58 } 59 return result; 60 } 61 62 68 74 80 86 } 87 | Popular Tags |