You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2009/02/19 01:28:26 UTC
svn commit: r745698 - in
/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp:
DelegatingCallableStatement.java DelegatingPreparedStatement.java
Author: markt
Date: Thu Feb 19 00:28:26 2009
New Revision: 745698
URL: http://svn.apache.org/viewvc?rev=745698&view=rev
Log:
Fix DBCP-253. Don't mask fields.
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java
Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java?rev=745698&r1=745697&r2=745698&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java Thu Feb 19 00:28:26 2009
@@ -58,9 +58,6 @@
public class DelegatingCallableStatement extends DelegatingPreparedStatement
implements CallableStatement {
- /** My delegate. */
- protected CallableStatement _stmt = null;
-
/**
* Create a wrapper for the Statement which traces this
* Statement to the Connection which created it and the
@@ -72,7 +69,6 @@
public DelegatingCallableStatement(DelegatingConnection c,
CallableStatement s) {
super(c, s);
- _stmt = s;
}
public boolean equals(Object obj) {
@@ -96,86 +92,86 @@
}
public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException
- { checkOpen(); try { _stmt.registerOutParameter( parameterIndex, sqlType); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).registerOutParameter( parameterIndex, sqlType); } catch (SQLException e) { handleException(e); } }
public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException
- { checkOpen(); try { _stmt.registerOutParameter( parameterIndex, sqlType, scale); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).registerOutParameter( parameterIndex, sqlType, scale); } catch (SQLException e) { handleException(e); } }
public boolean wasNull() throws SQLException
- { checkOpen(); try { return _stmt.wasNull(); } catch (SQLException e) { handleException(e); return false; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).wasNull(); } catch (SQLException e) { handleException(e); return false; } }
public String getString(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getString( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getString( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public boolean getBoolean(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getBoolean( parameterIndex); } catch (SQLException e) { handleException(e); return false; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBoolean( parameterIndex); } catch (SQLException e) { handleException(e); return false; } }
public byte getByte(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getByte( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getByte( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
public short getShort(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getShort( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getShort( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
public int getInt(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getInt( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getInt( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
public long getLong(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getLong( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getLong( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
public float getFloat(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getFloat( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getFloat( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
public double getDouble(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getDouble( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getDouble( parameterIndex); } catch (SQLException e) { handleException(e); return 0; } }
/** @deprecated */
public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException
- { checkOpen(); try { return _stmt.getBigDecimal( parameterIndex, scale); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBigDecimal( parameterIndex, scale); } catch (SQLException e) { handleException(e); return null; } }
public byte[] getBytes(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getBytes( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBytes( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public Date getDate(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getDate( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getDate( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public Time getTime(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getTime( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTime( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public Timestamp getTimestamp(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getTimestamp( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTimestamp( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public Object getObject(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getObject( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getObject( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public BigDecimal getBigDecimal(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getBigDecimal( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBigDecimal( parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public Object getObject(int i, Map map) throws SQLException
- { checkOpen(); try { return _stmt.getObject( i, map); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getObject( i, map); } catch (SQLException e) { handleException(e); return null; } }
public Ref getRef(int i) throws SQLException
- { checkOpen(); try { return _stmt.getRef( i); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getRef( i); } catch (SQLException e) { handleException(e); return null; } }
public Blob getBlob(int i) throws SQLException
- { checkOpen(); try { return _stmt.getBlob( i); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBlob( i); } catch (SQLException e) { handleException(e); return null; } }
public Clob getClob(int i) throws SQLException
- { checkOpen(); try { return _stmt.getClob( i); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getClob( i); } catch (SQLException e) { handleException(e); return null; } }
public Array getArray(int i) throws SQLException
- { checkOpen(); try { return _stmt.getArray( i); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getArray( i); } catch (SQLException e) { handleException(e); return null; } }
public Date getDate(int parameterIndex, Calendar cal) throws SQLException
- { checkOpen(); try { return _stmt.getDate( parameterIndex, cal); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getDate( parameterIndex, cal); } catch (SQLException e) { handleException(e); return null; } }
public Time getTime(int parameterIndex, Calendar cal) throws SQLException
- { checkOpen(); try { return _stmt.getTime( parameterIndex, cal); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTime( parameterIndex, cal); } catch (SQLException e) { handleException(e); return null; } }
public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException
- { checkOpen(); try { return _stmt.getTimestamp( parameterIndex, cal); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTimestamp( parameterIndex, cal); } catch (SQLException e) { handleException(e); return null; } }
public void registerOutParameter(int paramIndex, int sqlType, String typeName) throws SQLException
- { checkOpen(); try { _stmt.registerOutParameter( paramIndex, sqlType, typeName); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).registerOutParameter( paramIndex, sqlType, typeName); } catch (SQLException e) { handleException(e); } }
// ------------------- JDBC 3.0 -----------------------------------------
// Will be commented by the build process on a JDBC 2.0 system
@@ -183,167 +179,167 @@
/* JDBC_3_ANT_KEY_BEGIN */
public void registerOutParameter(String parameterName, int sqlType) throws SQLException
- { checkOpen(); try { _stmt.registerOutParameter(parameterName, sqlType); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).registerOutParameter(parameterName, sqlType); } catch (SQLException e) { handleException(e); } }
public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException
- { checkOpen(); try { _stmt.registerOutParameter(parameterName, sqlType, scale); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).registerOutParameter(parameterName, sqlType, scale); } catch (SQLException e) { handleException(e); } }
public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException
- { checkOpen(); try { _stmt.registerOutParameter(parameterName, sqlType, typeName); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).registerOutParameter(parameterName, sqlType, typeName); } catch (SQLException e) { handleException(e); } }
public URL getURL(int parameterIndex) throws SQLException
- { checkOpen(); try { return _stmt.getURL(parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getURL(parameterIndex); } catch (SQLException e) { handleException(e); return null; } }
public void setURL(String parameterName, URL val) throws SQLException
- { checkOpen(); try { _stmt.setURL(parameterName, val); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setURL(parameterName, val); } catch (SQLException e) { handleException(e); } }
public void setNull(String parameterName, int sqlType) throws SQLException
- { checkOpen(); try { _stmt.setNull(parameterName, sqlType); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setNull(parameterName, sqlType); } catch (SQLException e) { handleException(e); } }
public void setBoolean(String parameterName, boolean x) throws SQLException
- { checkOpen(); try { _stmt.setBoolean(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setBoolean(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setByte(String parameterName, byte x) throws SQLException
- { checkOpen(); try { _stmt.setByte(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setByte(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setShort(String parameterName, short x) throws SQLException
- { checkOpen(); try { _stmt.setShort(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setShort(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setInt(String parameterName, int x) throws SQLException
- { checkOpen(); try { _stmt.setInt(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setInt(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setLong(String parameterName, long x) throws SQLException
- { checkOpen(); try { _stmt.setLong(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setLong(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setFloat(String parameterName, float x) throws SQLException
- { checkOpen(); try { _stmt.setFloat(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setFloat(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setDouble(String parameterName, double x) throws SQLException
- { checkOpen(); try { _stmt.setDouble(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setDouble(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException
- { checkOpen(); try { _stmt.setBigDecimal(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setBigDecimal(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setString(String parameterName, String x) throws SQLException
- { checkOpen(); try { _stmt.setString(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setString(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setBytes(String parameterName, byte [] x) throws SQLException
- { checkOpen(); try { _stmt.setBytes(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setBytes(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setDate(String parameterName, Date x) throws SQLException
- { checkOpen(); try { _stmt.setDate(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setDate(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setTime(String parameterName, Time x) throws SQLException
- { checkOpen(); try { _stmt.setTime(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setTime(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setTimestamp(String parameterName, Timestamp x) throws SQLException
- { checkOpen(); try { _stmt.setTimestamp(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setTimestamp(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException
- { checkOpen(); try { _stmt.setAsciiStream(parameterName, x, length); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setAsciiStream(parameterName, x, length); } catch (SQLException e) { handleException(e); } }
public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException
- { checkOpen(); try { _stmt.setBinaryStream(parameterName, x, length); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setBinaryStream(parameterName, x, length); } catch (SQLException e) { handleException(e); } }
public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException
- { checkOpen(); try { _stmt.setObject(parameterName, x, targetSqlType, scale); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setObject(parameterName, x, targetSqlType, scale); } catch (SQLException e) { handleException(e); } }
public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException
- { checkOpen(); try { _stmt.setObject(parameterName, x, targetSqlType); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setObject(parameterName, x, targetSqlType); } catch (SQLException e) { handleException(e); } }
public void setObject(String parameterName, Object x) throws SQLException
- { checkOpen(); try { _stmt.setObject(parameterName, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setObject(parameterName, x); } catch (SQLException e) { handleException(e); } }
public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException
- { checkOpen(); _stmt.setCharacterStream(parameterName, reader, length); }
+ { checkOpen(); ((CallableStatement)_stmt).setCharacterStream(parameterName, reader, length); }
public void setDate(String parameterName, Date x, Calendar cal) throws SQLException
- { checkOpen(); try { _stmt.setDate(parameterName, x, cal); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setDate(parameterName, x, cal); } catch (SQLException e) { handleException(e); } }
public void setTime(String parameterName, Time x, Calendar cal) throws SQLException
- { checkOpen(); try { _stmt.setTime(parameterName, x, cal); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setTime(parameterName, x, cal); } catch (SQLException e) { handleException(e); } }
public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException
- { checkOpen(); try { _stmt.setTimestamp(parameterName, x, cal); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setTimestamp(parameterName, x, cal); } catch (SQLException e) { handleException(e); } }
public void setNull(String parameterName, int sqlType, String typeName) throws SQLException
- { checkOpen(); try { _stmt.setNull(parameterName, sqlType, typeName); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((CallableStatement)_stmt).setNull(parameterName, sqlType, typeName); } catch (SQLException e) { handleException(e); } }
public String getString(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getString(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getString(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public boolean getBoolean(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getBoolean(parameterName); } catch (SQLException e) { handleException(e); return false; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBoolean(parameterName); } catch (SQLException e) { handleException(e); return false; } }
public byte getByte(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getByte(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getByte(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
public short getShort(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getShort(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getShort(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
public int getInt(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getInt(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getInt(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
public long getLong(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getLong(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getLong(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
public float getFloat(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getFloat(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getFloat(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
public double getDouble(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getDouble(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getDouble(parameterName); } catch (SQLException e) { handleException(e); return 0; } }
public byte[] getBytes(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getBytes(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBytes(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Date getDate(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getDate(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getDate(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Time getTime(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getTime(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTime(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Timestamp getTimestamp(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getTimestamp(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTimestamp(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Object getObject(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getObject(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getObject(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public BigDecimal getBigDecimal(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getBigDecimal(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBigDecimal(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Object getObject(String parameterName, Map map) throws SQLException
- { checkOpen(); try { return _stmt.getObject(parameterName, map); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getObject(parameterName, map); } catch (SQLException e) { handleException(e); return null; } }
public Ref getRef(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getRef(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getRef(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Blob getBlob(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getBlob(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getBlob(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Clob getClob(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getClob(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getClob(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Array getArray(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getArray(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getArray(parameterName); } catch (SQLException e) { handleException(e); return null; } }
public Date getDate(String parameterName, Calendar cal) throws SQLException
- { checkOpen(); try { return _stmt.getDate(parameterName, cal); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getDate(parameterName, cal); } catch (SQLException e) { handleException(e); return null; } }
public Time getTime(String parameterName, Calendar cal) throws SQLException
- { checkOpen(); try { return _stmt.getTime(parameterName, cal); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTime(parameterName, cal); } catch (SQLException e) { handleException(e); return null; } }
public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException
- { checkOpen(); try { return _stmt.getTimestamp(parameterName, cal); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getTimestamp(parameterName, cal); } catch (SQLException e) { handleException(e); return null; } }
public URL getURL(String parameterName) throws SQLException
- { checkOpen(); try { return _stmt.getURL(parameterName); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((CallableStatement)_stmt).getURL(parameterName); } catch (SQLException e) { handleException(e); return null; } }
/* JDBC_3_ANT_KEY_END */
/* JDBC_4_ANT_KEY_BEGIN */
public RowId getRowId(int parameterIndex) throws SQLException {
checkOpen();
try {
- return _stmt.getRowId(parameterIndex);
+ return ((CallableStatement)_stmt).getRowId(parameterIndex);
}
catch (SQLException e) {
handleException(e);
@@ -354,7 +350,7 @@
public RowId getRowId(String parameterName) throws SQLException {
checkOpen();
try {
- return _stmt.getRowId(parameterName);
+ return ((CallableStatement)_stmt).getRowId(parameterName);
}
catch (SQLException e) {
handleException(e);
@@ -365,7 +361,7 @@
public void setRowId(String parameterName, RowId value) throws SQLException {
checkOpen();
try {
- _stmt.setRowId(parameterName, value);
+ ((CallableStatement)_stmt).setRowId(parameterName, value);
}
catch (SQLException e) {
handleException(e);
@@ -375,7 +371,7 @@
public void setNString(String parameterName, String value) throws SQLException {
checkOpen();
try {
- _stmt.setNString(parameterName, value);
+ ((CallableStatement)_stmt).setNString(parameterName, value);
}
catch (SQLException e) {
handleException(e);
@@ -385,7 +381,7 @@
public void setNCharacterStream(String parameterName, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setNCharacterStream(parameterName, reader, length);
+ ((CallableStatement)_stmt).setNCharacterStream(parameterName, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -395,7 +391,7 @@
public void setNClob(String parameterName, NClob value) throws SQLException {
checkOpen();
try {
- _stmt.setNClob(parameterName, value);
+ ((CallableStatement)_stmt).setNClob(parameterName, value);
}
catch (SQLException e) {
handleException(e);
@@ -405,7 +401,7 @@
public void setClob(String parameterName, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setClob(parameterName, reader, length);
+ ((CallableStatement)_stmt).setClob(parameterName, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -415,7 +411,7 @@
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException {
checkOpen();
try {
- _stmt.setBlob(parameterName, inputStream, length);
+ ((CallableStatement)_stmt).setBlob(parameterName, inputStream, length);
}
catch (SQLException e) {
handleException(e);
@@ -425,7 +421,7 @@
public void setNClob(String parameterName, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setNClob(parameterName, reader, length);
+ ((CallableStatement)_stmt).setNClob(parameterName, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -435,7 +431,7 @@
public NClob getNClob(int parameterIndex) throws SQLException {
checkOpen();
try {
- return _stmt.getNClob(parameterIndex);
+ return ((CallableStatement)_stmt).getNClob(parameterIndex);
}
catch (SQLException e) {
handleException(e);
@@ -446,7 +442,7 @@
public NClob getNClob(String parameterName) throws SQLException {
checkOpen();
try {
- return _stmt.getNClob(parameterName);
+ return ((CallableStatement)_stmt).getNClob(parameterName);
}
catch (SQLException e) {
handleException(e);
@@ -457,7 +453,7 @@
public void setSQLXML(String parameterName, SQLXML value) throws SQLException {
checkOpen();
try {
- _stmt.setSQLXML(parameterName, value);
+ ((CallableStatement)_stmt).setSQLXML(parameterName, value);
}
catch (SQLException e) {
handleException(e);
@@ -467,7 +463,7 @@
public SQLXML getSQLXML(int parameterIndex) throws SQLException {
checkOpen();
try {
- return _stmt.getSQLXML(parameterIndex);
+ return ((CallableStatement)_stmt).getSQLXML(parameterIndex);
}
catch (SQLException e) {
handleException(e);
@@ -478,7 +474,7 @@
public SQLXML getSQLXML(String parameterName) throws SQLException {
checkOpen();
try {
- return _stmt.getSQLXML(parameterName);
+ return ((CallableStatement)_stmt).getSQLXML(parameterName);
}
catch (SQLException e) {
handleException(e);
@@ -489,7 +485,7 @@
public String getNString(int parameterIndex) throws SQLException {
checkOpen();
try {
- return _stmt.getNString(parameterIndex);
+ return ((CallableStatement)_stmt).getNString(parameterIndex);
}
catch (SQLException e) {
handleException(e);
@@ -500,7 +496,7 @@
public String getNString(String parameterName) throws SQLException {
checkOpen();
try {
- return _stmt.getNString(parameterName);
+ return ((CallableStatement)_stmt).getNString(parameterName);
}
catch (SQLException e) {
handleException(e);
@@ -511,7 +507,7 @@
public Reader getNCharacterStream(int parameterIndex) throws SQLException {
checkOpen();
try {
- return _stmt.getNCharacterStream(parameterIndex);
+ return ((CallableStatement)_stmt).getNCharacterStream(parameterIndex);
}
catch (SQLException e) {
handleException(e);
@@ -522,7 +518,7 @@
public Reader getNCharacterStream(String parameterName) throws SQLException {
checkOpen();
try {
- return _stmt.getNCharacterStream(parameterName);
+ return ((CallableStatement)_stmt).getNCharacterStream(parameterName);
}
catch (SQLException e) {
handleException(e);
@@ -533,7 +529,7 @@
public Reader getCharacterStream(int parameterIndex) throws SQLException {
checkOpen();
try {
- return _stmt.getCharacterStream(parameterIndex);
+ return ((CallableStatement)_stmt).getCharacterStream(parameterIndex);
}
catch (SQLException e) {
handleException(e);
@@ -544,7 +540,7 @@
public Reader getCharacterStream(String parameterName) throws SQLException {
checkOpen();
try {
- return _stmt.getCharacterStream(parameterName);
+ return ((CallableStatement)_stmt).getCharacterStream(parameterName);
}
catch (SQLException e) {
handleException(e);
@@ -555,7 +551,7 @@
public void setBlob(String parameterName, Blob blob) throws SQLException {
checkOpen();
try {
- _stmt.setBlob(parameterName, blob);
+ ((CallableStatement)_stmt).setBlob(parameterName, blob);
}
catch (SQLException e) {
handleException(e);
@@ -565,7 +561,7 @@
public void setClob(String parameterName, Clob clob) throws SQLException {
checkOpen();
try {
- _stmt.setClob(parameterName, clob);
+ ((CallableStatement)_stmt).setClob(parameterName, clob);
}
catch (SQLException e) {
handleException(e);
@@ -575,7 +571,7 @@
public void setAsciiStream(String parameterName, InputStream inputStream, long length) throws SQLException {
checkOpen();
try {
- _stmt.setAsciiStream(parameterName, inputStream, length);
+ ((CallableStatement)_stmt).setAsciiStream(parameterName, inputStream, length);
}
catch (SQLException e) {
handleException(e);
@@ -585,7 +581,7 @@
public void setBinaryStream(String parameterName, InputStream inputStream, long length) throws SQLException {
checkOpen();
try {
- _stmt.setBinaryStream(parameterName, inputStream, length);
+ ((CallableStatement)_stmt).setBinaryStream(parameterName, inputStream, length);
}
catch (SQLException e) {
handleException(e);
@@ -595,7 +591,7 @@
public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setCharacterStream(parameterName, reader, length);
+ ((CallableStatement)_stmt).setCharacterStream(parameterName, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -605,7 +601,7 @@
public void setAsciiStream(String parameterName, InputStream inputStream) throws SQLException {
checkOpen();
try {
- _stmt.setAsciiStream(parameterName, inputStream);
+ ((CallableStatement)_stmt).setAsciiStream(parameterName, inputStream);
}
catch (SQLException e) {
handleException(e);
@@ -615,7 +611,7 @@
public void setBinaryStream(String parameterName, InputStream inputStream) throws SQLException {
checkOpen();
try {
- _stmt.setBinaryStream(parameterName, inputStream);
+ ((CallableStatement)_stmt).setBinaryStream(parameterName, inputStream);
}
catch (SQLException e) {
handleException(e);
@@ -625,7 +621,7 @@
public void setCharacterStream(String parameterName, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setCharacterStream(parameterName, reader);
+ ((CallableStatement)_stmt).setCharacterStream(parameterName, reader);
}
catch (SQLException e) {
handleException(e);
@@ -635,7 +631,7 @@
public void setNCharacterStream(String parameterName, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setNCharacterStream(parameterName, reader);
+ ((CallableStatement)_stmt).setNCharacterStream(parameterName, reader);
}
catch (SQLException e) {
handleException(e);
@@ -645,7 +641,7 @@
public void setClob(String parameterName, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setClob(parameterName, reader);
+ ((CallableStatement)_stmt).setClob(parameterName, reader);
}
catch (SQLException e) {
handleException(e);
@@ -654,7 +650,7 @@
public void setBlob(String parameterName, InputStream inputStream) throws SQLException {
checkOpen();
try {
- _stmt.setBlob(parameterName, inputStream);
+ ((CallableStatement)_stmt).setBlob(parameterName, inputStream);
}
catch (SQLException e) {
handleException(e);
@@ -663,7 +659,7 @@
public void setNClob(String parameterName, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setNClob(parameterName, reader);
+ ((CallableStatement)_stmt).setNClob(parameterName, reader);
}
catch (SQLException e) {
handleException(e);
Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java?rev=745698&r1=745697&r2=745698&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java Thu Feb 19 00:28:26 2009
@@ -57,9 +57,6 @@
public class DelegatingPreparedStatement extends DelegatingStatement
implements PreparedStatement {
- /** My delegate. */
- protected PreparedStatement _stmt = null;
-
/**
* Create a wrapper for the Statement which traces this
* Statement to the Connection which created it and the
@@ -71,7 +68,6 @@
public DelegatingPreparedStatement(DelegatingConnection c,
PreparedStatement s) {
super(c, s);
- _stmt = s;
}
public boolean equals(Object obj) {
@@ -97,7 +93,7 @@
public ResultSet executeQuery() throws SQLException {
checkOpen();
try {
- return DelegatingResultSet.wrapResultSet(this,_stmt.executeQuery());
+ return DelegatingResultSet.wrapResultSet(this,((PreparedStatement)_stmt).executeQuery());
}
catch (SQLException e) {
handleException(e);
@@ -106,107 +102,107 @@
}
public int executeUpdate() throws SQLException
- { checkOpen(); try { return _stmt.executeUpdate(); } catch (SQLException e) { handleException(e); return 0; } }
+ { checkOpen(); try { return ((PreparedStatement)_stmt).executeUpdate(); } catch (SQLException e) { handleException(e); return 0; } }
public void setNull(int parameterIndex, int sqlType) throws SQLException
- { checkOpen(); try { _stmt.setNull(parameterIndex,sqlType); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setNull(parameterIndex,sqlType); } catch (SQLException e) { handleException(e); } }
public void setBoolean(int parameterIndex, boolean x) throws SQLException
- { checkOpen(); try { _stmt.setBoolean(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setBoolean(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setByte(int parameterIndex, byte x) throws SQLException
- { checkOpen(); try { _stmt.setByte(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setByte(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setShort(int parameterIndex, short x) throws SQLException
- { checkOpen(); try { _stmt.setShort(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setShort(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setInt(int parameterIndex, int x) throws SQLException
- { checkOpen(); try { _stmt.setInt(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setInt(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setLong(int parameterIndex, long x) throws SQLException
- { checkOpen(); try { _stmt.setLong(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setLong(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setFloat(int parameterIndex, float x) throws SQLException
- { checkOpen(); try { _stmt.setFloat(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setFloat(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setDouble(int parameterIndex, double x) throws SQLException
- { checkOpen(); try { _stmt.setDouble(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setDouble(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
- { checkOpen(); try { _stmt.setBigDecimal(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setBigDecimal(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setString(int parameterIndex, String x) throws SQLException
- { checkOpen(); try { _stmt.setString(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setString(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setBytes(int parameterIndex, byte[] x) throws SQLException
- { checkOpen(); try { _stmt.setBytes(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setBytes(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setDate(int parameterIndex, java.sql.Date x) throws SQLException
- { checkOpen(); try { _stmt.setDate(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setDate(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setTime(int parameterIndex, java.sql.Time x) throws SQLException
- { checkOpen(); try { _stmt.setTime(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setTime(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException
- { checkOpen(); try { _stmt.setTimestamp(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setTimestamp(parameterIndex,x); } catch (SQLException e) { handleException(e); } }
public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException
- { checkOpen(); try { _stmt.setAsciiStream(parameterIndex,x,length); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setAsciiStream(parameterIndex,x,length); } catch (SQLException e) { handleException(e); } }
/** @deprecated */
public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException
- { checkOpen(); try { _stmt.setUnicodeStream(parameterIndex,x,length); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setUnicodeStream(parameterIndex,x,length); } catch (SQLException e) { handleException(e); } }
public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException
- { checkOpen(); try { _stmt.setBinaryStream(parameterIndex,x,length); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setBinaryStream(parameterIndex,x,length); } catch (SQLException e) { handleException(e); } }
public void clearParameters() throws SQLException
- { checkOpen(); try { _stmt.clearParameters(); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).clearParameters(); } catch (SQLException e) { handleException(e); } }
public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException
- { checkOpen(); try { _stmt.setObject(parameterIndex, x, targetSqlType, scale); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setObject(parameterIndex, x, targetSqlType, scale); } catch (SQLException e) { handleException(e); } }
public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException
- { checkOpen(); try { _stmt.setObject(parameterIndex, x, targetSqlType); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setObject(parameterIndex, x, targetSqlType); } catch (SQLException e) { handleException(e); } }
public void setObject(int parameterIndex, Object x) throws SQLException
- { checkOpen(); try { _stmt.setObject(parameterIndex, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setObject(parameterIndex, x); } catch (SQLException e) { handleException(e); } }
public boolean execute() throws SQLException
- { checkOpen(); try { return _stmt.execute(); } catch (SQLException e) { handleException(e); return false; } }
+ { checkOpen(); try { return ((PreparedStatement)_stmt).execute(); } catch (SQLException e) { handleException(e); return false; } }
public void addBatch() throws SQLException
- { checkOpen(); try { _stmt.addBatch(); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).addBatch(); } catch (SQLException e) { handleException(e); } }
public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws SQLException
- { checkOpen(); try { _stmt.setCharacterStream(parameterIndex,reader,length); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setCharacterStream(parameterIndex,reader,length); } catch (SQLException e) { handleException(e); } }
public void setRef(int i, Ref x) throws SQLException
- { checkOpen(); try { _stmt.setRef(i,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setRef(i,x); } catch (SQLException e) { handleException(e); } }
public void setBlob(int i, Blob x) throws SQLException
- { checkOpen(); try { _stmt.setBlob(i,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setBlob(i,x); } catch (SQLException e) { handleException(e); } }
public void setClob(int i, Clob x) throws SQLException
- { checkOpen(); try { _stmt.setClob(i,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setClob(i,x); } catch (SQLException e) { handleException(e); } }
public void setArray(int i, Array x) throws SQLException
- { checkOpen(); try { _stmt.setArray(i,x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setArray(i,x); } catch (SQLException e) { handleException(e); } }
public ResultSetMetaData getMetaData() throws SQLException
- { checkOpen(); try { return _stmt.getMetaData(); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((PreparedStatement)_stmt).getMetaData(); } catch (SQLException e) { handleException(e); return null; } }
public void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException
- { checkOpen(); try { _stmt.setDate(parameterIndex,x,cal); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setDate(parameterIndex,x,cal); } catch (SQLException e) { handleException(e); } }
public void setTime(int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException
- { checkOpen(); try { _stmt.setTime(parameterIndex,x,cal); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setTime(parameterIndex,x,cal); } catch (SQLException e) { handleException(e); } }
public void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) throws SQLException
- { checkOpen(); try { _stmt.setTimestamp(parameterIndex,x,cal); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setTimestamp(parameterIndex,x,cal); } catch (SQLException e) { handleException(e); } }
public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException
- { checkOpen(); try { _stmt.setNull(paramIndex,sqlType,typeName); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setNull(paramIndex,sqlType,typeName); } catch (SQLException e) { handleException(e); } }
/**
* Returns a String representation of this object.
@@ -224,17 +220,17 @@
/* JDBC_3_ANT_KEY_BEGIN */
public void setURL(int parameterIndex, java.net.URL x) throws SQLException
- { checkOpen(); try { _stmt.setURL(parameterIndex, x); } catch (SQLException e) { handleException(e); } }
+ { checkOpen(); try { ((PreparedStatement)_stmt).setURL(parameterIndex, x); } catch (SQLException e) { handleException(e); } }
public java.sql.ParameterMetaData getParameterMetaData() throws SQLException
- { checkOpen(); try { return _stmt.getParameterMetaData(); } catch (SQLException e) { handleException(e); return null; } }
+ { checkOpen(); try { return ((PreparedStatement)_stmt).getParameterMetaData(); } catch (SQLException e) { handleException(e); return null; } }
/* JDBC_3_ANT_KEY_END */
/* JDBC_4_ANT_KEY_BEGIN */
public void setRowId(int parameterIndex, RowId value) throws SQLException {
checkOpen();
try {
- _stmt.setRowId(parameterIndex, value);
+ ((PreparedStatement)_stmt).setRowId(parameterIndex, value);
}
catch (SQLException e) {
handleException(e);
@@ -244,7 +240,7 @@
public void setNString(int parameterIndex, String value) throws SQLException {
checkOpen();
try {
- _stmt.setNString(parameterIndex, value);
+ ((PreparedStatement)_stmt).setNString(parameterIndex, value);
}
catch (SQLException e) {
handleException(e);
@@ -254,7 +250,7 @@
public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
checkOpen();
try {
- _stmt.setNCharacterStream(parameterIndex, value, length);
+ ((PreparedStatement)_stmt).setNCharacterStream(parameterIndex, value, length);
}
catch (SQLException e) {
handleException(e);
@@ -264,7 +260,7 @@
public void setNClob(int parameterIndex, NClob value) throws SQLException {
checkOpen();
try {
- _stmt.setNClob(parameterIndex, value);
+ ((PreparedStatement)_stmt).setNClob(parameterIndex, value);
}
catch (SQLException e) {
handleException(e);
@@ -274,7 +270,7 @@
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setClob(parameterIndex, reader, length);
+ ((PreparedStatement)_stmt).setClob(parameterIndex, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -284,7 +280,7 @@
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
checkOpen();
try {
- _stmt.setBlob(parameterIndex, inputStream, length);
+ ((PreparedStatement)_stmt).setBlob(parameterIndex, inputStream, length);
}
catch (SQLException e) {
handleException(e);
@@ -294,7 +290,7 @@
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setNClob(parameterIndex, reader, length);
+ ((PreparedStatement)_stmt).setNClob(parameterIndex, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -304,7 +300,7 @@
public void setSQLXML(int parameterIndex, SQLXML value) throws SQLException {
checkOpen();
try {
- _stmt.setSQLXML(parameterIndex, value);
+ ((PreparedStatement)_stmt).setSQLXML(parameterIndex, value);
}
catch (SQLException e) {
handleException(e);
@@ -314,7 +310,7 @@
public void setAsciiStream(int parameterIndex, InputStream inputStream, long length) throws SQLException {
checkOpen();
try {
- _stmt.setAsciiStream(parameterIndex, inputStream, length);
+ ((PreparedStatement)_stmt).setAsciiStream(parameterIndex, inputStream, length);
}
catch (SQLException e) {
handleException(e);
@@ -324,7 +320,7 @@
public void setBinaryStream(int parameterIndex, InputStream inputStream, long length) throws SQLException {
checkOpen();
try {
- _stmt.setBinaryStream(parameterIndex, inputStream, length);
+ ((PreparedStatement)_stmt).setBinaryStream(parameterIndex, inputStream, length);
}
catch (SQLException e) {
handleException(e);
@@ -334,7 +330,7 @@
public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {
checkOpen();
try {
- _stmt.setCharacterStream(parameterIndex, reader, length);
+ ((PreparedStatement)_stmt).setCharacterStream(parameterIndex, reader, length);
}
catch (SQLException e) {
handleException(e);
@@ -344,7 +340,7 @@
public void setAsciiStream(int parameterIndex, InputStream inputStream) throws SQLException {
checkOpen();
try {
- _stmt.setAsciiStream(parameterIndex, inputStream);
+ ((PreparedStatement)_stmt).setAsciiStream(parameterIndex, inputStream);
}
catch (SQLException e) {
handleException(e);
@@ -354,7 +350,7 @@
public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException {
checkOpen();
try {
- _stmt.setBinaryStream(parameterIndex, inputStream);
+ ((PreparedStatement)_stmt).setBinaryStream(parameterIndex, inputStream);
}
catch (SQLException e) {
handleException(e);
@@ -364,7 +360,7 @@
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setCharacterStream(parameterIndex, reader);
+ ((PreparedStatement)_stmt).setCharacterStream(parameterIndex, reader);
}
catch (SQLException e) {
handleException(e);
@@ -374,7 +370,7 @@
public void setNCharacterStream(int parameterIndex, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setNCharacterStream(parameterIndex, reader);
+ ((PreparedStatement)_stmt).setNCharacterStream(parameterIndex, reader);
}
catch (SQLException e) {
handleException(e);
@@ -384,7 +380,7 @@
public void setClob(int parameterIndex, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setClob(parameterIndex, reader);
+ ((PreparedStatement)_stmt).setClob(parameterIndex, reader);
}
catch (SQLException e) {
handleException(e);
@@ -394,7 +390,7 @@
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
checkOpen();
try {
- _stmt.setBlob(parameterIndex, inputStream);
+ ((PreparedStatement)_stmt).setBlob(parameterIndex, inputStream);
}
catch (SQLException e) {
handleException(e);
@@ -404,7 +400,7 @@
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
checkOpen();
try {
- _stmt.setNClob(parameterIndex, reader);
+ ((PreparedStatement)_stmt).setNClob(parameterIndex, reader);
}
catch (SQLException e) {
handleException(e);