1 2 12 package com.versant.core.jdbc.sql.conv; 13 14 import com.versant.core.jdbc.JdbcConverter; 15 import com.versant.core.jdbc.JdbcConverterFactory; 16 import com.versant.core.jdbc.JdbcTypeRegistry; 17 import com.versant.core.jdbc.metadata.JdbcColumn; 18 19 import java.sql.PreparedStatement ; 20 import java.sql.SQLException ; 21 import java.sql.ResultSet ; 22 import java.sql.Clob ; 23 24 25 27 28 import javax.jdo.JDOFatalDataStoreException; 30 import org.polepos.teams.jdo.*; 31 32 import com.versant.core.common.BindingSupportImpl; 33 34 39 public class OracleClobConverter implements JdbcConverter { 40 41 public OracleClobConverter(){ 42 VoaEdited.exception(); 43 } 44 45 public static class Factory extends NoArgJdbcConverterFactory { 46 47 private OracleClobConverter converter; 48 49 53 public JdbcConverter createJdbcConverter(JdbcColumn col, Object args, 54 JdbcTypeRegistry jdbcTypeRegistry) { 55 if (converter == null) converter = new OracleClobConverter(); 56 return converter; 57 } 58 59 } 60 61 67 public boolean isOracleStyleLOB() { 68 return true; 69 } 70 71 76 public String getOracleStyleLOBNotNullString() { 77 return "empty_clob()"; 78 } 79 80 85 public Object get(ResultSet rs, int index, JdbcColumn col) 86 throws SQLException , JDOFatalDataStoreException { 87 88 VoaEdited.exception(); 89 return null; 90 91 96 } 97 98 99 100 101 106 public void set(PreparedStatement ps, int index, JdbcColumn col, Object value) 107 throws SQLException , JDOFatalDataStoreException { 108 throw BindingSupportImpl.getInstance().internal("set(ps..) called"); 109 } 110 111 118 public void set(PreparedStatement ps, int index, JdbcColumn col, int value) 119 throws SQLException , JDOFatalDataStoreException { 120 throw BindingSupportImpl.getInstance().internal("set(..int) called"); 121 } 122 123 130 public void set(ResultSet rs, int index, JdbcColumn col, Object value) 131 throws SQLException , JDOFatalDataStoreException { 132 133 VoaEdited.exception(); 134 135 139 } 143 144 145 149 public Class getValueType() { 150 return String .class; 151 } 152 153 } 154 155 | Popular Tags |