Repository: commons-dbcp Updated Branches: refs/heads/master 812121b8e -> e176d65e0
Sort members in AB order so it's easier to find stuff. Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/e176d65e Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/e176d65e Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/e176d65e Branch: refs/heads/master Commit: e176d65e03aee3135bf91691c0a43f0ef7f24b02 Parents: 812121b Author: Gary Gregory <[email protected]> Authored: Sun Jun 17 09:54:45 2018 -0600 Committer: Gary Gregory <[email protected]> Committed: Sun Jun 17 09:54:45 2018 -0600 ---------------------------------------------------------------------- .../dbcp2/DelegatingCallableStatement.java | 580 +++++++++---------- 1 file changed, 290 insertions(+), 290 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e176d65e/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java index 978467a..b652149 100644 --- a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java +++ b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java @@ -65,41 +65,45 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public void registerOutParameter(final int parameterIndex, final int sqlType) throws SQLException { + public Array getArray(final int i) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType); + return getDelegateCallableStatement().getArray(i); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void registerOutParameter(final int parameterIndex, final int sqlType, final int scale) throws SQLException { + public Array getArray(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType, scale); + return getDelegateCallableStatement().getArray(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public boolean wasNull() throws SQLException { + public BigDecimal getBigDecimal(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().wasNull(); + return getDelegateCallableStatement().getBigDecimal(parameterIndex); } catch (final SQLException e) { handleException(e); - return false; + return null; } } + /** @deprecated Use {@link #getBigDecimal(int)} or {@link #getBigDecimal(String)} */ @Override - public String getString(final int parameterIndex) throws SQLException { + @Deprecated + public BigDecimal getBigDecimal(final int parameterIndex, final int scale) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getString(parameterIndex); + return getDelegateCallableStatement().getBigDecimal(parameterIndex, scale); } catch (final SQLException e) { handleException(e); return null; @@ -107,65 +111,65 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public boolean getBoolean(final int parameterIndex) throws SQLException { + public BigDecimal getBigDecimal(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBoolean(parameterIndex); + return getDelegateCallableStatement().getBigDecimal(parameterName); } catch (final SQLException e) { handleException(e); - return false; + return null; } } @Override - public byte getByte(final int parameterIndex) throws SQLException { + public Blob getBlob(final int i) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getByte(parameterIndex); + return getDelegateCallableStatement().getBlob(i); } catch (final SQLException e) { handleException(e); - return 0; + return null; } } @Override - public short getShort(final int parameterIndex) throws SQLException { + public Blob getBlob(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getShort(parameterIndex); + return getDelegateCallableStatement().getBlob(parameterName); } catch (final SQLException e) { handleException(e); - return 0; + return null; } } @Override - public int getInt(final int parameterIndex) throws SQLException { + public boolean getBoolean(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getInt(parameterIndex); + return getDelegateCallableStatement().getBoolean(parameterIndex); } catch (final SQLException e) { handleException(e); - return 0; + return false; } } @Override - public long getLong(final int parameterIndex) throws SQLException { + public boolean getBoolean(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getLong(parameterIndex); + return getDelegateCallableStatement().getBoolean(parameterName); } catch (final SQLException e) { handleException(e); - return 0; + return false; } } @Override - public float getFloat(final int parameterIndex) throws SQLException { + public byte getByte(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getFloat(parameterIndex); + return getDelegateCallableStatement().getByte(parameterIndex); } catch (final SQLException e) { handleException(e); return 0; @@ -173,23 +177,21 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public double getDouble(final int parameterIndex) throws SQLException { + public byte getByte(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getDouble(parameterIndex); + return getDelegateCallableStatement().getByte(parameterName); } catch (final SQLException e) { handleException(e); return 0; } } - /** @deprecated Use {@link #getBigDecimal(int)} or {@link #getBigDecimal(String)} */ @Override - @Deprecated - public BigDecimal getBigDecimal(final int parameterIndex, final int scale) throws SQLException { + public byte[] getBytes(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBigDecimal(parameterIndex, scale); + return getDelegateCallableStatement().getBytes(parameterIndex); } catch (final SQLException e) { handleException(e); return null; @@ -197,10 +199,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public byte[] getBytes(final int parameterIndex) throws SQLException { + public byte[] getBytes(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBytes(parameterIndex); + return getDelegateCallableStatement().getBytes(parameterName); } catch (final SQLException e) { handleException(e); return null; @@ -208,10 +210,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Date getDate(final int parameterIndex) throws SQLException { + public Reader getCharacterStream(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getDate(parameterIndex); + return getDelegateCallableStatement().getCharacterStream(parameterIndex); } catch (final SQLException e) { handleException(e); return null; @@ -219,10 +221,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Time getTime(final int parameterIndex) throws SQLException { + public Reader getCharacterStream(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTime(parameterIndex); + return getDelegateCallableStatement().getCharacterStream(parameterName); } catch (final SQLException e) { handleException(e); return null; @@ -230,10 +232,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Timestamp getTimestamp(final int parameterIndex) throws SQLException { + public Clob getClob(final int i) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTimestamp(parameterIndex); + return getDelegateCallableStatement().getClob(i); } catch (final SQLException e) { handleException(e); return null; @@ -241,10 +243,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Object getObject(final int parameterIndex) throws SQLException { + public Clob getClob(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getObject(parameterIndex); + return getDelegateCallableStatement().getClob(parameterName); } catch (final SQLException e) { handleException(e); return null; @@ -252,10 +254,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public BigDecimal getBigDecimal(final int parameterIndex) throws SQLException { + public Date getDate(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBigDecimal(parameterIndex); + return getDelegateCallableStatement().getDate(parameterIndex); } catch (final SQLException e) { handleException(e); return null; @@ -263,10 +265,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException { + public Date getDate(final int parameterIndex, final Calendar cal) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getObject(i, map); + return getDelegateCallableStatement().getDate(parameterIndex, cal); } catch (final SQLException e) { handleException(e); return null; @@ -274,10 +276,10 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Ref getRef(final int i) throws SQLException { + public Date getDate(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getRef(i); + return getDelegateCallableStatement().getDate(parameterName); } catch (final SQLException e) { handleException(e); return null; @@ -285,119 +287,124 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public Blob getBlob(final int i) throws SQLException { + public Date getDate(final String parameterName, final Calendar cal) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBlob(i); + return getDelegateCallableStatement().getDate(parameterName, cal); } catch (final SQLException e) { handleException(e); return null; } } + private CallableStatement getDelegateCallableStatement() { + return (CallableStatement) getDelegate(); + } + @Override - public Clob getClob(final int i) throws SQLException { + public double getDouble(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getClob(i); + return getDelegateCallableStatement().getDouble(parameterIndex); } catch (final SQLException e) { handleException(e); - return null; + return 0; } } @Override - public Array getArray(final int i) throws SQLException { + public double getDouble(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getArray(i); + return getDelegateCallableStatement().getDouble(parameterName); } catch (final SQLException e) { handleException(e); - return null; + return 0; } } @Override - public Date getDate(final int parameterIndex, final Calendar cal) throws SQLException { + public float getFloat(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getDate(parameterIndex, cal); + return getDelegateCallableStatement().getFloat(parameterIndex); } catch (final SQLException e) { handleException(e); - return null; + return 0; } } @Override - public Time getTime(final int parameterIndex, final Calendar cal) throws SQLException { + public float getFloat(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTime(parameterIndex, cal); + return getDelegateCallableStatement().getFloat(parameterName); } catch (final SQLException e) { handleException(e); - return null; + return 0; } } @Override - public Timestamp getTimestamp(final int parameterIndex, final Calendar cal) throws SQLException { + public int getInt(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTimestamp(parameterIndex, cal); + return getDelegateCallableStatement().getInt(parameterIndex); } catch (final SQLException e) { handleException(e); - return null; + return 0; } } @Override - public void registerOutParameter(final int paramIndex, final int sqlType, final String typeName) - throws SQLException { + public int getInt(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().registerOutParameter(paramIndex, sqlType, typeName); + return getDelegateCallableStatement().getInt(parameterName); } catch (final SQLException e) { handleException(e); + return 0; } } @Override - public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException { + public long getLong(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().registerOutParameter(parameterName, sqlType); + return getDelegateCallableStatement().getLong(parameterIndex); } catch (final SQLException e) { handleException(e); + return 0; } } @Override - public void registerOutParameter(final String parameterName, final int sqlType, final int scale) - throws SQLException { + public long getLong(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, scale); + return getDelegateCallableStatement().getLong(parameterName); } catch (final SQLException e) { handleException(e); + return 0; } } @Override - public void registerOutParameter(final String parameterName, final int sqlType, final String typeName) - throws SQLException { + public Reader getNCharacterStream(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, typeName); + return getDelegateCallableStatement().getNCharacterStream(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public URL getURL(final int parameterIndex) throws SQLException { + public Reader getNCharacterStream(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getURL(parameterIndex); + return getDelegateCallableStatement().getNCharacterStream(parameterName); } catch (final SQLException e) { handleException(e); return null; @@ -405,258 +412,274 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public void setURL(final String parameterName, final URL val) throws SQLException { + public NClob getNClob(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setURL(parameterName, val); + return getDelegateCallableStatement().getNClob(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setNull(final String parameterName, final int sqlType) throws SQLException { + public NClob getNClob(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNull(parameterName, sqlType); + return getDelegateCallableStatement().getNClob(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setBoolean(final String parameterName, final boolean x) throws SQLException { + public String getNString(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBoolean(parameterName, x); + return getDelegateCallableStatement().getNString(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setByte(final String parameterName, final byte x) throws SQLException { + public String getNString(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setByte(parameterName, x); + return getDelegateCallableStatement().getNString(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setShort(final String parameterName, final short x) throws SQLException { + public Object getObject(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setShort(parameterName, x); + return getDelegateCallableStatement().getObject(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setInt(final String parameterName, final int x) throws SQLException { + public <T> T getObject(final int parameterIndex, final Class<T> type) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setInt(parameterName, x); + return getDelegateCallableStatement().getObject(parameterIndex, type); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setLong(final String parameterName, final long x) throws SQLException { + public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setLong(parameterName, x); + return getDelegateCallableStatement().getObject(i, map); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setFloat(final String parameterName, final float x) throws SQLException { + public Object getObject(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setFloat(parameterName, x); + return getDelegateCallableStatement().getObject(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setDouble(final String parameterName, final double x) throws SQLException { + public <T> T getObject(final String parameterName, final Class<T> type) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setDouble(parameterName, x); + return getDelegateCallableStatement().getObject(parameterName, type); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setBigDecimal(final String parameterName, final BigDecimal x) throws SQLException { + public Object getObject(final String parameterName, final Map<String, Class<?>> map) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBigDecimal(parameterName, x); + return getDelegateCallableStatement().getObject(parameterName, map); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setString(final String parameterName, final String x) throws SQLException { + public Ref getRef(final int i) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setString(parameterName, x); + return getDelegateCallableStatement().getRef(i); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setBytes(final String parameterName, final byte[] x) throws SQLException { + public Ref getRef(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBytes(parameterName, x); + return getDelegateCallableStatement().getRef(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setDate(final String parameterName, final Date x) throws SQLException { + public RowId getRowId(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setDate(parameterName, x); + return getDelegateCallableStatement().getRowId(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setTime(final String parameterName, final Time x) throws SQLException { + public RowId getRowId(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setTime(parameterName, x); + return getDelegateCallableStatement().getRowId(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setTimestamp(final String parameterName, final Timestamp x) throws SQLException { + public short getShort(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setTimestamp(parameterName, x); + return getDelegateCallableStatement().getShort(parameterIndex); } catch (final SQLException e) { handleException(e); + return 0; } } @Override - public void setAsciiStream(final String parameterName, final InputStream x, final int length) throws SQLException { + public short getShort(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setAsciiStream(parameterName, x, length); + return getDelegateCallableStatement().getShort(parameterName); } catch (final SQLException e) { handleException(e); + return 0; } } @Override - public void setBinaryStream(final String parameterName, final InputStream x, final int length) throws SQLException { + public SQLXML getSQLXML(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBinaryStream(parameterName, x, length); + return getDelegateCallableStatement().getSQLXML(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setObject(final String parameterName, final Object x, final int targetSqlType, final int scale) - throws SQLException { + public SQLXML getSQLXML(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setObject(parameterName, x, targetSqlType, scale); + return getDelegateCallableStatement().getSQLXML(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setObject(final String parameterName, final Object x, final int targetSqlType) throws SQLException { + public String getString(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setObject(parameterName, x, targetSqlType); + return getDelegateCallableStatement().getString(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setObject(final String parameterName, final Object x) throws SQLException { + public String getString(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setObject(parameterName, x); + return getDelegateCallableStatement().getString(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setCharacterStream(final String parameterName, final Reader reader, final int length) - throws SQLException { - checkOpen(); - getDelegateCallableStatement().setCharacterStream(parameterName, reader, length); - } - - @Override - public void setDate(final String parameterName, final Date x, final Calendar cal) throws SQLException { + public Time getTime(final int parameterIndex) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setDate(parameterName, x, cal); + return getDelegateCallableStatement().getTime(parameterIndex); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setTime(final String parameterName, final Time x, final Calendar cal) throws SQLException { + public Time getTime(final int parameterIndex, final Calendar cal) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setTime(parameterName, x, cal); + return getDelegateCallableStatement().getTime(parameterIndex, cal); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setTimestamp(final String parameterName, final Timestamp x, final Calendar cal) throws SQLException { + public Time getTime(final String parameterName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setTimestamp(parameterName, x, cal); + return getDelegateCallableStatement().getTime(parameterName); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public void setNull(final String parameterName, final int sqlType, final String typeName) throws SQLException { + public Time getTime(final String parameterName, final Calendar cal) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNull(parameterName, sqlType, typeName); + return getDelegateCallableStatement().getTime(parameterName, cal); } catch (final SQLException e) { handleException(e); + return null; } } @Override - public String getString(final String parameterName) throws SQLException { + public Timestamp getTimestamp(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getString(parameterName); + return getDelegateCallableStatement().getTimestamp(parameterIndex); } catch (final SQLException e) { handleException(e); return null; @@ -664,309 +687,299 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public boolean getBoolean(final String parameterName) throws SQLException { + public Timestamp getTimestamp(final int parameterIndex, final Calendar cal) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBoolean(parameterName); + return getDelegateCallableStatement().getTimestamp(parameterIndex, cal); } catch (final SQLException e) { handleException(e); - return false; + return null; } } @Override - public byte getByte(final String parameterName) throws SQLException { + public Timestamp getTimestamp(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getByte(parameterName); + return getDelegateCallableStatement().getTimestamp(parameterName); } catch (final SQLException e) { handleException(e); - return 0; + return null; } } @Override - public short getShort(final String parameterName) throws SQLException { + public Timestamp getTimestamp(final String parameterName, final Calendar cal) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getShort(parameterName); + return getDelegateCallableStatement().getTimestamp(parameterName, cal); } catch (final SQLException e) { handleException(e); - return 0; + return null; } } @Override - public int getInt(final String parameterName) throws SQLException { + public URL getURL(final int parameterIndex) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getInt(parameterName); + return getDelegateCallableStatement().getURL(parameterIndex); } catch (final SQLException e) { handleException(e); - return 0; + return null; } } @Override - public long getLong(final String parameterName) throws SQLException { + public URL getURL(final String parameterName) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getLong(parameterName); + return getDelegateCallableStatement().getURL(parameterName); } catch (final SQLException e) { handleException(e); - return 0; + return null; } } @Override - public float getFloat(final String parameterName) throws SQLException { + public void registerOutParameter(final int parameterIndex, final int sqlType) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getFloat(parameterName); + getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType); } catch (final SQLException e) { handleException(e); - return 0; } } @Override - public double getDouble(final String parameterName) throws SQLException { + public void registerOutParameter(final int parameterIndex, final int sqlType, final int scale) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getDouble(parameterName); + getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType, scale); } catch (final SQLException e) { handleException(e); - return 0; } } @Override - public byte[] getBytes(final String parameterName) throws SQLException { + public void registerOutParameter(final int paramIndex, final int sqlType, final String typeName) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBytes(parameterName); + getDelegateCallableStatement().registerOutParameter(paramIndex, sqlType, typeName); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Date getDate(final String parameterName) throws SQLException { + public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getDate(parameterName); + getDelegateCallableStatement().registerOutParameter(parameterName, sqlType); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Time getTime(final String parameterName) throws SQLException { + public void registerOutParameter(final String parameterName, final int sqlType, final int scale) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTime(parameterName); + getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, scale); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Timestamp getTimestamp(final String parameterName) throws SQLException { + public void registerOutParameter(final String parameterName, final int sqlType, final String typeName) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTimestamp(parameterName); + getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, typeName); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Object getObject(final String parameterName) throws SQLException { + public void setAsciiStream(final String parameterName, final InputStream inputStream) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getObject(parameterName); + getDelegateCallableStatement().setAsciiStream(parameterName, inputStream); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public BigDecimal getBigDecimal(final String parameterName) throws SQLException { + public void setAsciiStream(final String parameterName, final InputStream x, final int length) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBigDecimal(parameterName); + getDelegateCallableStatement().setAsciiStream(parameterName, x, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Object getObject(final String parameterName, final Map<String, Class<?>> map) throws SQLException { + public void setAsciiStream(final String parameterName, final InputStream inputStream, final long length) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getObject(parameterName, map); + getDelegateCallableStatement().setAsciiStream(parameterName, inputStream, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Ref getRef(final String parameterName) throws SQLException { + public void setBigDecimal(final String parameterName, final BigDecimal x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getRef(parameterName); + getDelegateCallableStatement().setBigDecimal(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Blob getBlob(final String parameterName) throws SQLException { + public void setBinaryStream(final String parameterName, final InputStream inputStream) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getBlob(parameterName); + getDelegateCallableStatement().setBinaryStream(parameterName, inputStream); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Clob getClob(final String parameterName) throws SQLException { + public void setBinaryStream(final String parameterName, final InputStream x, final int length) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getClob(parameterName); + getDelegateCallableStatement().setBinaryStream(parameterName, x, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Array getArray(final String parameterName) throws SQLException { + public void setBinaryStream(final String parameterName, final InputStream inputStream, final long length) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getArray(parameterName); + getDelegateCallableStatement().setBinaryStream(parameterName, inputStream, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Date getDate(final String parameterName, final Calendar cal) throws SQLException { + public void setBlob(final String parameterName, final Blob blob) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getDate(parameterName, cal); + getDelegateCallableStatement().setBlob(parameterName, blob); } catch (final SQLException e) { handleException(e); - return null; } } - private CallableStatement getDelegateCallableStatement() { - return (CallableStatement) getDelegate(); - } - @Override - public Time getTime(final String parameterName, final Calendar cal) throws SQLException { + public void setBlob(final String parameterName, final InputStream inputStream) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTime(parameterName, cal); + getDelegateCallableStatement().setBlob(parameterName, inputStream); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Timestamp getTimestamp(final String parameterName, final Calendar cal) throws SQLException { + public void setBlob(final String parameterName, final InputStream inputStream, final long length) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getTimestamp(parameterName, cal); + getDelegateCallableStatement().setBlob(parameterName, inputStream, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public URL getURL(final String parameterName) throws SQLException { + public void setBoolean(final String parameterName, final boolean x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getURL(parameterName); + getDelegateCallableStatement().setBoolean(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public RowId getRowId(final int parameterIndex) throws SQLException { + public void setByte(final String parameterName, final byte x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getRowId(parameterIndex); + getDelegateCallableStatement().setByte(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public RowId getRowId(final String parameterName) throws SQLException { + public void setBytes(final String parameterName, final byte[] x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getRowId(parameterName); + getDelegateCallableStatement().setBytes(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public void setRowId(final String parameterName, final RowId value) throws SQLException { + public void setCharacterStream(final String parameterName, final Reader reader) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setRowId(parameterName, value); + getDelegateCallableStatement().setCharacterStream(parameterName, reader); } catch (final SQLException e) { handleException(e); } } @Override - public void setNString(final String parameterName, final String value) throws SQLException { + public void setCharacterStream(final String parameterName, final Reader reader, final int length) + throws SQLException { + checkOpen(); + getDelegateCallableStatement().setCharacterStream(parameterName, reader, length); + } + + @Override + public void setCharacterStream(final String parameterName, final Reader reader, final long length) + throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNString(parameterName, value); + getDelegateCallableStatement().setCharacterStream(parameterName, reader, length); } catch (final SQLException e) { handleException(e); } } @Override - public void setNCharacterStream(final String parameterName, final Reader reader, final long length) - throws SQLException { + public void setClob(final String parameterName, final Clob clob) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNCharacterStream(parameterName, reader, length); + getDelegateCallableStatement().setClob(parameterName, clob); } catch (final SQLException e) { handleException(e); } } @Override - public void setNClob(final String parameterName, final NClob value) throws SQLException { + public void setClob(final String parameterName, final Reader reader) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNClob(parameterName, value); + getDelegateCallableStatement().setClob(parameterName, reader); } catch (final SQLException e) { handleException(e); } @@ -983,288 +996,275 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp } @Override - public void setBlob(final String parameterName, final InputStream inputStream, final long length) - throws SQLException { + public void setDate(final String parameterName, final Date x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBlob(parameterName, inputStream, length); + getDelegateCallableStatement().setDate(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public void setNClob(final String parameterName, final Reader reader, final long length) throws SQLException { + public void setDate(final String parameterName, final Date x, final Calendar cal) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNClob(parameterName, reader, length); + getDelegateCallableStatement().setDate(parameterName, x, cal); } catch (final SQLException e) { handleException(e); } } @Override - public NClob getNClob(final int parameterIndex) throws SQLException { + public void setDouble(final String parameterName, final double x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getNClob(parameterIndex); + getDelegateCallableStatement().setDouble(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public NClob getNClob(final String parameterName) throws SQLException { + public void setFloat(final String parameterName, final float x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getNClob(parameterName); + getDelegateCallableStatement().setFloat(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public void setSQLXML(final String parameterName, final SQLXML value) throws SQLException { + public void setInt(final String parameterName, final int x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setSQLXML(parameterName, value); + getDelegateCallableStatement().setInt(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public SQLXML getSQLXML(final int parameterIndex) throws SQLException { + public void setLong(final String parameterName, final long x) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getSQLXML(parameterIndex); + getDelegateCallableStatement().setLong(parameterName, x); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public SQLXML getSQLXML(final String parameterName) throws SQLException { + public void setNCharacterStream(final String parameterName, final Reader reader) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getSQLXML(parameterName); + getDelegateCallableStatement().setNCharacterStream(parameterName, reader); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public String getNString(final int parameterIndex) throws SQLException { + public void setNCharacterStream(final String parameterName, final Reader reader, final long length) + throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getNString(parameterIndex); + getDelegateCallableStatement().setNCharacterStream(parameterName, reader, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public String getNString(final String parameterName) throws SQLException { + public void setNClob(final String parameterName, final NClob value) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getNString(parameterName); + getDelegateCallableStatement().setNClob(parameterName, value); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Reader getNCharacterStream(final int parameterIndex) throws SQLException { + public void setNClob(final String parameterName, final Reader reader) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getNCharacterStream(parameterIndex); + getDelegateCallableStatement().setNClob(parameterName, reader); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Reader getNCharacterStream(final String parameterName) throws SQLException { + public void setNClob(final String parameterName, final Reader reader, final long length) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getNCharacterStream(parameterName); + getDelegateCallableStatement().setNClob(parameterName, reader, length); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Reader getCharacterStream(final int parameterIndex) throws SQLException { + public void setNString(final String parameterName, final String value) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getCharacterStream(parameterIndex); + getDelegateCallableStatement().setNString(parameterName, value); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public Reader getCharacterStream(final String parameterName) throws SQLException { + public void setNull(final String parameterName, final int sqlType) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getCharacterStream(parameterName); + getDelegateCallableStatement().setNull(parameterName, sqlType); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public void setBlob(final String parameterName, final Blob blob) throws SQLException { + public void setNull(final String parameterName, final int sqlType, final String typeName) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBlob(parameterName, blob); + getDelegateCallableStatement().setNull(parameterName, sqlType, typeName); } catch (final SQLException e) { handleException(e); } } @Override - public void setClob(final String parameterName, final Clob clob) throws SQLException { + public void setObject(final String parameterName, final Object x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setClob(parameterName, clob); + getDelegateCallableStatement().setObject(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public void setAsciiStream(final String parameterName, final InputStream inputStream, final long length) - throws SQLException { + public void setObject(final String parameterName, final Object x, final int targetSqlType) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setAsciiStream(parameterName, inputStream, length); + getDelegateCallableStatement().setObject(parameterName, x, targetSqlType); } catch (final SQLException e) { handleException(e); } } @Override - public void setBinaryStream(final String parameterName, final InputStream inputStream, final long length) + public void setObject(final String parameterName, final Object x, final int targetSqlType, final int scale) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBinaryStream(parameterName, inputStream, length); + getDelegateCallableStatement().setObject(parameterName, x, targetSqlType, scale); } catch (final SQLException e) { handleException(e); } } @Override - public void setCharacterStream(final String parameterName, final Reader reader, final long length) - throws SQLException { + public void setRowId(final String parameterName, final RowId value) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setCharacterStream(parameterName, reader, length); + getDelegateCallableStatement().setRowId(parameterName, value); } catch (final SQLException e) { handleException(e); } } @Override - public void setAsciiStream(final String parameterName, final InputStream inputStream) throws SQLException { + public void setShort(final String parameterName, final short x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setAsciiStream(parameterName, inputStream); + getDelegateCallableStatement().setShort(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public void setBinaryStream(final String parameterName, final InputStream inputStream) throws SQLException { + public void setSQLXML(final String parameterName, final SQLXML value) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBinaryStream(parameterName, inputStream); + getDelegateCallableStatement().setSQLXML(parameterName, value); } catch (final SQLException e) { handleException(e); } } @Override - public void setCharacterStream(final String parameterName, final Reader reader) throws SQLException { + public void setString(final String parameterName, final String x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setCharacterStream(parameterName, reader); + getDelegateCallableStatement().setString(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public void setNCharacterStream(final String parameterName, final Reader reader) throws SQLException { + public void setTime(final String parameterName, final Time x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNCharacterStream(parameterName, reader); + getDelegateCallableStatement().setTime(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public void setClob(final String parameterName, final Reader reader) throws SQLException { + public void setTime(final String parameterName, final Time x, final Calendar cal) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setClob(parameterName, reader); + getDelegateCallableStatement().setTime(parameterName, x, cal); } catch (final SQLException e) { handleException(e); } } @Override - public void setBlob(final String parameterName, final InputStream inputStream) throws SQLException { + public void setTimestamp(final String parameterName, final Timestamp x) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setBlob(parameterName, inputStream); + getDelegateCallableStatement().setTimestamp(parameterName, x); } catch (final SQLException e) { handleException(e); } } @Override - public void setNClob(final String parameterName, final Reader reader) throws SQLException { + public void setTimestamp(final String parameterName, final Timestamp x, final Calendar cal) throws SQLException { checkOpen(); try { - getDelegateCallableStatement().setNClob(parameterName, reader); + getDelegateCallableStatement().setTimestamp(parameterName, x, cal); } catch (final SQLException e) { handleException(e); } } @Override - public <T> T getObject(final int parameterIndex, final Class<T> type) throws SQLException { + public void setURL(final String parameterName, final URL val) throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getObject(parameterIndex, type); + getDelegateCallableStatement().setURL(parameterName, val); } catch (final SQLException e) { handleException(e); - return null; } } @Override - public <T> T getObject(final String parameterName, final Class<T> type) throws SQLException { + public boolean wasNull() throws SQLException { checkOpen(); try { - return getDelegateCallableStatement().getObject(parameterName, type); + return getDelegateCallableStatement().wasNull(); } catch (final SQLException e) { handleException(e); - return null; + return false; } }
