1 21 22 package uk.org.primrose.pool.core; 23 24 import java.math.BigDecimal ; 25 import java.util.Calendar ; 26 import java.sql.*; 27 28 33 public class PoolCallableStatement extends PoolPreparedStatement implements CallableStatement { 34 CallableStatement cs = null; 35 PoolSqlMonitor poolSqlMonitor = null; 36 37 public PoolCallableStatement(CallableStatement cs, PoolSqlMonitor poolSqlMonitor) { 38 super(cs, poolSqlMonitor); 39 this.poolSqlMonitor = poolSqlMonitor; 40 poolSqlMonitor.setStatementClosed(false); 41 poolSqlMonitor.setStatement(this); 42 this.cs = cs; 43 } 44 45 public PoolCallableStatement(){ 46 super(); 47 } 48 49 public void setPoolSqlMonitor(PoolSqlMonitor poolSqlMonitor) { 50 this.poolSqlMonitor = poolSqlMonitor; 51 } 52 53 public PoolSqlMonitor getPoolSqlMonitor() { 54 return poolSqlMonitor; 55 } 56 57 public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException { 58 cs.registerOutParameter(parameterIndex, sqlType); 59 } 60 61 public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException { 62 cs.registerOutParameter(parameterIndex, sqlType, scale); 63 } 64 65 public boolean wasNull() throws SQLException { 66 return cs.wasNull(); 67 } 68 69 public String getString(int parameterIndex) throws SQLException { 70 return cs.getString(parameterIndex); 71 } 72 73 public boolean getBoolean(int parameterIndex) throws SQLException { 74 return cs.getBoolean(parameterIndex); 75 } 76 77 public byte getByte(int parameterIndex) throws SQLException { 78 return cs.getByte(parameterIndex); 79 } 80 81 public short getShort(int parameterIndex) throws SQLException { 82 return cs.getShort(parameterIndex); 83 } 84 85 public int getInt(int parameterIndex) throws SQLException { 86 return cs.getInt(parameterIndex); 87 } 88 89 public long getLong(int parameterIndex) throws SQLException { 90 return cs.getLong(parameterIndex); 91 } 92 93 public float getFloat(int parameterIndex) throws SQLException { 94 return cs.getFloat(parameterIndex); 95 } 96 97 public double getDouble(int parameterIndex) throws SQLException { 98 return cs.getDouble(parameterIndex); 99 } 100 101 public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException { 102 return cs.getBigDecimal(parameterIndex, scale); 103 } 104 105 public byte[] getBytes(int parameterIndex) throws SQLException { 106 return cs.getBytes(parameterIndex); 107 } 108 109 public java.sql.Date getDate(int parameterIndex) throws SQLException { 110 return cs.getDate(parameterIndex); 111 } 112 113 public java.sql.Time getTime(int parameterIndex) throws SQLException { 114 return cs.getTime(parameterIndex); 115 } 116 117 public java.sql.Timestamp getTimestamp(int parameterIndex) throws SQLException { 118 return cs.getTimestamp(parameterIndex); 119 } 120 121 public Object getObject(int parameterIndex) throws SQLException { 122 return cs.getObject(parameterIndex); 123 } 124 125 public BigDecimal getBigDecimal(int parameterIndex) throws SQLException { 126 return cs.getBigDecimal(parameterIndex); 127 } 128 129 public Object getObject (int i, java.util.Map map) throws SQLException { 130 return cs.getObject(i, map); 131 } 132 133 public Ref getRef (int i) throws SQLException { 134 return cs.getRef(i); 135 } 136 137 public Blob getBlob (int i) throws SQLException { 138 return cs.getBlob(i); 139 } 140 141 public Clob getClob (int i) throws SQLException { 142 return cs.getClob(i); 143 } 144 145 public Array getArray (int i) throws SQLException { 146 return cs.getArray(i); 147 } 148 149 public java.sql.Date getDate(int parameterIndex, Calendar cal) throws SQLException { 150 return cs.getDate(parameterIndex, cal); 151 } 152 153 public java.sql.Time getTime(int parameterIndex, Calendar cal) throws SQLException { 154 return cs.getTime(parameterIndex, cal); 155 } 156 157 public java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException { 158 return cs.getTimestamp(parameterIndex, cal); 159 } 160 161 162 public void registerOutParameter(int paramIndex, int sqlType, String typeName) throws SQLException { 163 cs.registerOutParameter(paramIndex, sqlType, typeName); 164 } 165 166 public void registerOutParameter(String parameterName, int sqlType) throws SQLException { 167 cs.registerOutParameter(parameterName, sqlType); 168 } 169 170 public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException { 171 cs.registerOutParameter(parameterName, sqlType, scale); 172 } 173 174 public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException { 175 cs.registerOutParameter(parameterName, sqlType, typeName); 176 } 177 178 public java.net.URL getURL(int parameterIndex) throws SQLException { 179 return cs.getURL(parameterIndex); 180 } 181 182 public void setURL(String parameterName, java.net.URL val) throws SQLException { 183 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +val +")"); 184 cs.setURL(parameterName, val); 185 } 186 187 public void setNull(String parameterName, int sqlType) throws SQLException { 188 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +sqlType +")"); 189 cs.setNull(parameterName, sqlType); 190 } 191 192 public void setBoolean(String parameterName, boolean x) throws SQLException { 193 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 194 cs.setBoolean(parameterName, x); 195 } 196 197 public void setByte(String parameterName, byte x) throws SQLException { 198 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 199 cs.setByte(parameterName, x); 200 } 201 202 public void setShort(String parameterName, short x) throws SQLException { 203 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 204 cs.setShort(parameterName, x); 205 } 206 207 public void setInt(String parameterName, int x) throws SQLException { 208 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 209 cs.setInt(parameterName, x); 210 } 211 212 public void setLong(String parameterName, long x) throws SQLException { 213 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 214 cs.setLong(parameterName, x); 215 } 216 217 public void setFloat(String parameterName, float x) throws SQLException { 218 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 219 cs.setFloat(parameterName, x); 220 } 221 222 public void setDouble(String parameterName, double x) throws SQLException { 223 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 224 cs.setDouble(parameterName, x); 225 } 226 227 public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { 228 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 229 cs.setBigDecimal(parameterName, x); 230 } 231 232 public void setString(String parameterName, String x) throws SQLException { 233 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 234 cs.setString(parameterName, x); 235 } 236 237 public void setBytes(String parameterName, byte x[]) throws SQLException { 238 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 239 cs.setBytes(parameterName, x); 240 } 241 242 public void setDate(String parameterName, java.sql.Date x) throws SQLException { 243 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 244 cs.setDate(parameterName, x); 245 } 246 247 public void setTime(String parameterName, java.sql.Time x) throws SQLException { 248 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 249 cs.setTime(parameterName, x); 250 } 251 252 public void setTimestamp(String parameterName, java.sql.Timestamp x) throws SQLException { 253 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 254 cs.setTimestamp(parameterName, x); 255 } 256 257 public void setAsciiStream(String parameterName, java.io.InputStream x, int length) throws SQLException { 258 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 259 cs.setAsciiStream(parameterName, x, length); 260 } 261 262 public void setBinaryStream(String parameterName, java.io.InputStream x, int length) throws SQLException { 263 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 264 cs.setBinaryStream(parameterName, x, length); 265 } 266 267 public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException { 268 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 269 cs.setObject(parameterName, x, targetSqlType, scale); 270 } 271 272 public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException { 273 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 274 cs.setObject(parameterName, x, targetSqlType); 275 } 276 277 public void setObject(String parameterName, Object x) throws SQLException { 278 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 279 cs.setObject(parameterName, x); 280 } 281 282 public void setCharacterStream(String parameterName, java.io.Reader reader, int length) throws SQLException { 283 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +reader +")"); 284 cs.setCharacterStream(parameterName, reader, length); 285 } 286 287 public void setDate(String parameterName, java.sql.Date x, Calendar cal) throws SQLException { 288 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 289 cs.setDate(parameterName, x, cal); 290 } 291 292 public void setTime(String parameterName, java.sql.Time x, Calendar cal) throws SQLException { 293 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 294 cs.setTime(parameterName, x, cal); 295 } 296 297 public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) throws SQLException { 298 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +x +")"); 299 cs.setTimestamp(parameterName, x, cal); 300 } 301 302 public void setNull(String parameterName, int sqlType, String typeName) throws SQLException { 303 poolSqlMonitor.setSql(poolSqlMonitor.getSql() +" " +parameterName +"(" +typeName +")"); 304 cs.setNull(parameterName, sqlType, typeName); 305 } 306 307 public String getString(String parameterName) throws SQLException { 308 return cs.getString(parameterName); 309 } 310 311 public boolean getBoolean(String parameterName) throws SQLException { 312 return cs.getBoolean(parameterName); 313 } 314 315 public byte getByte(String parameterName) throws SQLException { 316 return cs.getByte(parameterName); 317 } 318 319 public short getShort(String parameterName) throws SQLException { 320 return cs.getShort(parameterName); 321 } 322 323 public int getInt(String parameterName) throws SQLException { 324 return cs.getInt(parameterName); 325 } 326 327 public long getLong(String parameterName) throws SQLException { 328 return cs.getLong(parameterName); 329 } 330 331 public float getFloat(String parameterName) throws SQLException { 332 return cs.getFloat(parameterName); 333 } 334 335 public double getDouble(String parameterName) throws SQLException { 336 return cs.getDouble(parameterName); 337 } 338 339 public byte[] getBytes(String parameterName) throws SQLException { 340 return cs.getBytes(parameterName); 341 } 342 343 public java.sql.Date getDate(String parameterName) throws SQLException { 344 return cs.getDate(parameterName); 345 } 346 347 public java.sql.Time getTime(String parameterName) throws SQLException { 348 return cs.getTime(parameterName); 349 } 350 351 public java.sql.Timestamp getTimestamp(String parameterName) throws SQLException { 352 return cs.getTimestamp(parameterName); 353 } 354 355 public Object getObject(String parameterName) throws SQLException { 356 return cs.getObject(parameterName); 357 } 358 359 public BigDecimal getBigDecimal(String parameterName) throws SQLException { 360 return cs.getBigDecimal(parameterName); 361 } 362 363 public Object getObject (String parameterName, java.util.Map map) throws SQLException { 364 return cs.getObject(parameterName, map); 365 } 366 367 public Ref getRef (String parameterName) throws SQLException { 368 return cs.getRef(parameterName); 369 } 370 371 public Blob getBlob (String parameterName) throws SQLException { 372 return cs.getBlob(parameterName); 373 } 374 375 public Clob getClob (String parameterName) throws SQLException { 376 return cs.getClob(parameterName); 377 } 378 379 public Array getArray (String parameterName) throws SQLException { 380 return cs.getArray(parameterName); 381 } 382 383 public java.sql.Date getDate(String parameterName, Calendar cal) throws SQLException { 384 return cs.getDate(parameterName, cal); 385 } 386 387 public java.sql.Time getTime(String parameterName, Calendar cal) throws SQLException { 388 return cs.getTime(parameterName, cal); 389 } 390 391 public java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException { 392 return cs.getTimestamp(parameterName, cal); 393 } 394 395 public java.net.URL getURL(String parameterName) throws SQLException { 396 return cs.getURL(parameterName); 397 } 398 399 } 400 401 402 403 404 405 | Popular Tags |