1 21 22 package org.dbunit.dataset.datatype; 23 24 import org.dbunit.dataset.ITable; 25 26 import java.sql.Types ; 27 28 32 public class UnknownDataType extends AbstractDataType 33 { 34 UnknownDataType() 35 { 36 super("UNKNOWN", Types.OTHER, Object .class, false); 37 } 38 39 42 public Object typeCast(Object value) throws TypeCastException 43 { 44 if (value == ITable.NO_VALUE) 45 { 46 return null; 47 } 48 49 return value; 50 } 51 52 public int compare(Object o1, Object o2) throws TypeCastException 53 { 54 return super.compare(asString(o1), asString(o2)); 55 } 56 } 57 58 59 60 61 62 | Popular Tags |