1 25 package org.objectweb.jonas_ejb.lib; 26 27 28 34 public class FloatPkFieldMapping { 35 36 40 public static Class getStorageType() { 41 return String .class; 42 } 43 44 48 public static Class getMemoryType() { 49 return Float .class; 50 } 51 52 57 public static Object toMemory(Object storagevalue) { 58 if (storagevalue == null) { 59 return null; 60 } 61 return (storagevalue instanceof Float ? storagevalue : new Float ((String ) storagevalue)); 62 } 63 64 69 public static Object toStorage(Object memoryvalue) { 70 return memoryvalue.toString(); 71 } 72 } 73 74 | Popular Tags |