1 10 11 package com.triactive.jdo.store; 12 13 import java.sql.ResultSet ; 14 import java.sql.Types ; 15 16 17 23 24 class SAPDBTypeInfo extends TypeInfo 25 { 26 36 37 public SAPDBTypeInfo(ResultSet rs) 38 { 39 super(rs); 40 } 41 42 43 public boolean isCompatibleWith(ColumnInfo colInfo) 44 { 45 if (super.isCompatibleWith(colInfo)) 46 return true; 47 48 if (isVarBinaryType(dataType) && isVarBinaryType(colInfo.dataType)) 49 return true; 50 51 return false; 52 } 53 54 55 61 62 private static boolean isVarBinaryType(int type) 63 { 64 switch (type) 65 { 66 case Types.VARBINARY: 67 case Types.LONGVARBINARY: 68 return true; 69 70 default: 71 return false; 72 } 73 } 74 } 75 | Popular Tags |