1 2 12 package com.versant.core.jdbc.sql.conv; 13 14 import com.versant.core.jdbc.JdbcConverter; 15 import com.versant.core.jdbc.JdbcTypeRegistry; 16 import com.versant.core.jdbc.metadata.JdbcColumn; 17 18 import java.sql.PreparedStatement ; 19 import java.sql.SQLException ; 20 import java.sql.ResultSet ; 21 22 import javax.jdo.JDOFatalDataStoreException; 24 import com.versant.core.common.BindingSupportImpl; 25 26 33 public class NotSupportedConverter extends JdbcConverterBase { 34 35 public static class Factory extends NoArgJdbcConverterFactory { 36 37 private NotSupportedConverter converter; 38 39 43 public JdbcConverter createJdbcConverter(JdbcColumn col, Object args, 44 JdbcTypeRegistry jdbcTypeRegistry) { 45 if (converter == null) converter = new NotSupportedConverter(); 46 return converter; 47 } 48 49 } 50 51 56 public Object get(ResultSet rs, int index, JdbcColumn col) 57 throws SQLException , JDOFatalDataStoreException { 58 throw BindingSupportImpl.getInstance().fatalDatastore("Datatype not supported by database"); 59 } 60 61 66 public void set(PreparedStatement ps, int index, JdbcColumn col, Object value) 67 throws SQLException , JDOFatalDataStoreException { 68 throw BindingSupportImpl.getInstance().fatalDatastore("Datatype not supported by database"); 69 } 70 71 75 public Class getValueType() { 76 return byte[].class; 77 } 78 79 } 80 81 | Popular Tags |