1 21 22 package org.apache.derby.impl.jdbc; 23 24 import org.apache.derby.impl.jdbc.EmbedConnection; 25 import org.apache.derby.impl.jdbc.Util; 26 27 import org.apache.derby.iapi.sql.ResultSet; 28 import org.apache.derby.iapi.error.StandardException; 29 30 import org.apache.derby.iapi.reference.SQLState; 31 32 import java.io.InputStream ; 33 34 import java.math.BigDecimal ; 35 36 import java.sql.SQLException ; 37 import java.sql.SQLWarning ; 38 import java.sql.Date ; 39 import java.sql.Time ; 40 import java.sql.Timestamp ; 41 42 43 44 import java.sql.Array ; 45 import java.sql.Blob ; 46 import java.sql.Clob ; 47 import java.sql.Ref ; 48 import java.sql.Types ; 49 50 61 public class EmbedPreparedStatement20 62 extends org.apache.derby.impl.jdbc.EmbedPreparedStatement { 63 64 74 public EmbedPreparedStatement20 (EmbedConnection conn, String sql, boolean forMetaData, 75 int resultSetType, 76 int resultSetConcurrency, 77 int resultSetHoldability, 78 int autoGeneratedKeys, 79 int[] columnIndexes, 80 String [] columnNames) 81 throws SQLException { 82 83 super(conn, sql, forMetaData, resultSetType, resultSetConcurrency, resultSetHoldability, 84 autoGeneratedKeys, columnIndexes, columnNames); 85 } 86 87 96 public void setRef (int i, Ref x) throws SQLException { 97 throw Util.notImplemented(); 98 } 99 100 101 102 103 112 public void setArray (int i, Array x) throws SQLException { 113 throw Util.notImplemented(); 114 } 115 116 120 129 public final void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { 130 checkStatus(); 131 try { 132 133 getParms().getParameterForSet(parameterIndex - 1).setBigDecimal(x); 134 135 } catch (Throwable t) { 136 throw EmbedResultSet.noStateChangeException(t); 137 } 138 } 139 140 148 boolean setObjectConvert(int parameterIndex, Object x) throws SQLException 149 { 150 if (x instanceof BigDecimal ) { 151 setBigDecimal(parameterIndex, (BigDecimal ) x); 152 return true; 153 } 154 return false; 155 } 156 } 157 158 | Popular Tags |