00001 00025 package org.objectweb.jonas_ejb.lib; 00026 00027 00034 public class FloatPkFieldMapping { 00035 00040 public static Class getStorageType() { 00041 return String.class; 00042 } 00043 00048 public static Class getMemoryType() { 00049 return Float.class; 00050 } 00051 00057 public static Object toMemory(Object storagevalue) { 00058 if (storagevalue == null) { 00059 return null; 00060 } 00061 return (storagevalue instanceof Float ? storagevalue : new Float((String) storagevalue)); 00062 } 00063 00069 public static Object toStorage(Object memoryvalue) { 00070 return memoryvalue.toString(); 00071 } 00072 } 00073