提交 74b86ad8 authored 作者: Thomas Mueller's avatar Thomas Mueller

Issue 416: PreparedStatement.setNString throws AbstractMethodError.

上级 07b054c6
...@@ -18,7 +18,10 @@ Change Log ...@@ -18,7 +18,10 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Issue 414: for some functions, the parameters were evaluated twice <ul><li>Issue 416: PreparedStatement.setNString throws AbstractMethodError.
All implemented JDBC 4 methods that don't break compatiblity with Java 5
are now included in the default jar file.
</li><li>Issue 414: for some functions, the parameters were evaluated twice
(for example "char(nextval(..))" ran "nextval(..)" twice). (for example "char(nextval(..))" ran "nextval(..)" twice).
</li><li>The ResultSetMetaData methods getSchemaName and getTableName </li><li>The ResultSetMetaData methods getSchemaName and getTableName
could return null instead of "" (an empty string) as specified in the JDBC API. could return null instead of "" (an empty string) as specified in the JDBC API.
......
...@@ -794,12 +794,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -794,12 +794,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public String getNString(int parameterIndex) throws SQLException { public String getNString(int parameterIndex) throws SQLException {
checkRegistered(parameterIndex); checkRegistered(parameterIndex);
return getOpenResultSet().getNString(parameterIndex); return getOpenResultSet().getNString(parameterIndex);
} }
//*/
/** /**
* Returns the value of the specified column as a String. * Returns the value of the specified column as a String.
...@@ -809,11 +807,9 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -809,11 +807,9 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public String getNString(String parameterName) throws SQLException { public String getNString(String parameterName) throws SQLException {
return getNString(getIndexForName(parameterName)); return getNString(getIndexForName(parameterName));
} }
//*/
/** /**
* Returns the value of the specified column as a reader. * Returns the value of the specified column as a reader.
...@@ -823,13 +819,11 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -823,13 +819,11 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public Reader getNCharacterStream(int parameterIndex) public Reader getNCharacterStream(int parameterIndex)
throws SQLException { throws SQLException {
checkRegistered(parameterIndex); checkRegistered(parameterIndex);
return getOpenResultSet().getNCharacterStream(parameterIndex); return getOpenResultSet().getNCharacterStream(parameterIndex);
} }
//*/
/** /**
* Returns the value of the specified column as a reader. * Returns the value of the specified column as a reader.
...@@ -839,12 +833,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -839,12 +833,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public Reader getNCharacterStream(String parameterName) public Reader getNCharacterStream(String parameterName)
throws SQLException { throws SQLException {
return getNCharacterStream(getIndexForName(parameterName)); return getNCharacterStream(getIndexForName(parameterName));
} }
//*/
/** /**
* Returns the value of the specified column as a reader. * Returns the value of the specified column as a reader.
...@@ -854,13 +846,11 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -854,13 +846,11 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public Reader getCharacterStream(int parameterIndex) public Reader getCharacterStream(int parameterIndex)
throws SQLException { throws SQLException {
checkRegistered(parameterIndex); checkRegistered(parameterIndex);
return getOpenResultSet().getCharacterStream(parameterIndex); return getOpenResultSet().getCharacterStream(parameterIndex);
} }
//*/
/** /**
* Returns the value of the specified column as a reader. * Returns the value of the specified column as a reader.
...@@ -870,12 +860,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -870,12 +860,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public Reader getCharacterStream(String parameterName) public Reader getCharacterStream(String parameterName)
throws SQLException { throws SQLException {
return getCharacterStream(getIndexForName(parameterName)); return getCharacterStream(getIndexForName(parameterName));
} }
//*/
// ============================================================= // =============================================================
...@@ -1192,12 +1180,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1192,12 +1180,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNString(String parameterName, String x) public void setNString(String parameterName, String x)
throws SQLException { throws SQLException {
setNString(getIndexForName(parameterName), x); setNString(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1209,12 +1195,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1209,12 +1195,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param length the maximum number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNCharacterStream(String parameterName, public void setNCharacterStream(String parameterName,
Reader x, long length) throws SQLException { Reader x, long length) throws SQLException {
setNCharacterStream(getIndexForName(parameterName), x, length); setNCharacterStream(getIndexForName(parameterName), x, length);
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1240,12 +1224,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1240,12 +1224,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param length the maximum number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setClob(String parameterName, Reader x, public void setClob(String parameterName, Reader x,
long length) throws SQLException { long length) throws SQLException {
setClob(getIndexForName(parameterName), x, length); setClob(getIndexForName(parameterName), x, length);
} }
//*/
/** /**
* Sets the value of a parameter as a Blob. * Sets the value of a parameter as a Blob.
...@@ -1257,12 +1239,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1257,12 +1239,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param length the maximum number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setBlob(String parameterName, InputStream x, public void setBlob(String parameterName, InputStream x,
long length) throws SQLException { long length) throws SQLException {
setBlob(getIndexForName(parameterName), x, length); setBlob(getIndexForName(parameterName), x, length);
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1274,12 +1254,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1274,12 +1254,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param length the maximum number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNClob(String parameterName, Reader x, public void setNClob(String parameterName, Reader x,
long length) throws SQLException { long length) throws SQLException {
setNClob(getIndexForName(parameterName), x, length); setNClob(getIndexForName(parameterName), x, length);
} }
//*/
/** /**
* Sets the value of a parameter as a Blob. * Sets the value of a parameter as a Blob.
...@@ -1288,12 +1266,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1288,12 +1266,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setBlob(String parameterName, Blob x) public void setBlob(String parameterName, Blob x)
throws SQLException { throws SQLException {
setBlob(getIndexForName(parameterName), x); setBlob(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1302,11 +1278,9 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1302,11 +1278,9 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setClob(String parameterName, Clob x) throws SQLException { public void setClob(String parameterName, Clob x) throws SQLException {
setClob(getIndexForName(parameterName), x); setClob(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as an ASCII stream. * Sets the value of a parameter as an ASCII stream.
...@@ -1317,12 +1291,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1317,12 +1291,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setAsciiStream(String parameterName, InputStream x) public void setAsciiStream(String parameterName, InputStream x)
throws SQLException { throws SQLException {
setAsciiStream(getIndexForName(parameterName), x); setAsciiStream(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as an ASCII stream. * Sets the value of a parameter as an ASCII stream.
...@@ -1348,12 +1320,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1348,12 +1320,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setBinaryStream(String parameterName, public void setBinaryStream(String parameterName,
InputStream x) throws SQLException { InputStream x) throws SQLException {
setBinaryStream(getIndexForName(parameterName), x); setBinaryStream(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as an input stream. * Sets the value of a parameter as an input stream.
...@@ -1365,12 +1335,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1365,12 +1335,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param length the maximum number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setBinaryStream(String parameterName, public void setBinaryStream(String parameterName,
InputStream x, long length) throws SQLException { InputStream x, long length) throws SQLException {
setBinaryStream(getIndexForName(parameterName), x, length); setBinaryStream(getIndexForName(parameterName), x, length);
} }
//*/
/** /**
* Sets the value of a parameter as a Blob. * Sets the value of a parameter as a Blob.
...@@ -1381,12 +1349,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1381,12 +1349,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setBlob(String parameterName, InputStream x) public void setBlob(String parameterName, InputStream x)
throws SQLException { throws SQLException {
setBlob(getIndexForName(parameterName), x); setBlob(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1397,12 +1363,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1397,12 +1363,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setCharacterStream(String parameterName, Reader x) public void setCharacterStream(String parameterName, Reader x)
throws SQLException { throws SQLException {
setCharacterStream(getIndexForName(parameterName), x); setCharacterStream(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1414,12 +1378,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1414,12 +1378,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param length the maximum number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setCharacterStream(String parameterName, public void setCharacterStream(String parameterName,
Reader x, long length) throws SQLException { Reader x, long length) throws SQLException {
setCharacterStream(getIndexForName(parameterName), x, length); setCharacterStream(getIndexForName(parameterName), x, length);
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1430,11 +1392,9 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1430,11 +1392,9 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setClob(String parameterName, Reader x) throws SQLException { public void setClob(String parameterName, Reader x) throws SQLException {
setClob(getIndexForName(parameterName), x); setClob(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1445,12 +1405,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1445,12 +1405,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNCharacterStream(String parameterName, Reader x) public void setNCharacterStream(String parameterName, Reader x)
throws SQLException { throws SQLException {
setNCharacterStream(getIndexForName(parameterName), x); setNCharacterStream(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1461,12 +1419,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1461,12 +1419,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNClob(String parameterName, Reader x) public void setNClob(String parameterName, Reader x)
throws SQLException { throws SQLException {
setNClob(getIndexForName(parameterName), x); setNClob(getIndexForName(parameterName), x);
} }
//*/
/** /**
* [Not supported] Sets the value of a parameter as a SQLXML object. * [Not supported] Sets the value of a parameter as a SQLXML object.
......
...@@ -256,11 +256,9 @@ public class JdbcClob extends TraceObject implements Clob ...@@ -256,11 +256,9 @@ public class JdbcClob extends TraceObject implements Clob
/** /**
* [Not supported] Returns the reader, starting from an offset. * [Not supported] Returns the reader, starting from an offset.
*/ */
//## Java 1.6 ##
public Reader getCharacterStream(long pos, long length) throws SQLException { public Reader getCharacterStream(long pos, long length) throws SQLException {
throw unsupported("LOB subset"); throw unsupported("LOB subset");
} }
//*/
private void checkClosed() { private void checkClosed() {
conn.checkClosed(); conn.checkClosed();
......
...@@ -1304,7 +1304,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1304,7 +1304,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNString(int parameterIndex, String x) throws SQLException { public void setNString(int parameterIndex, String x) throws SQLException {
try { try {
if (isDebugEnabled()) { if (isDebugEnabled()) {
...@@ -1316,7 +1315,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1316,7 +1315,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1328,7 +1326,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1328,7 +1326,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param length the maximum number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNCharacterStream(int parameterIndex, Reader x, long length) public void setNCharacterStream(int parameterIndex, Reader x, long length)
throws SQLException { throws SQLException {
try { try {
...@@ -1347,7 +1344,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1347,7 +1344,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Sets the value of a parameter as a character stream. * Sets the value of a parameter as a character stream.
...@@ -1358,12 +1354,10 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1358,12 +1354,10 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNCharacterStream(int parameterIndex, Reader x) public void setNCharacterStream(int parameterIndex, Reader x)
throws SQLException { throws SQLException {
setNCharacterStream(parameterIndex, x, -1); setNCharacterStream(parameterIndex, x, -1);
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1401,7 +1395,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1401,7 +1395,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNClob(int parameterIndex, Reader x) throws SQLException { public void setNClob(int parameterIndex, Reader x) throws SQLException {
try { try {
if (isDebugEnabled()) { if (isDebugEnabled()) {
...@@ -1418,7 +1411,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1418,7 +1411,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1484,7 +1476,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1484,7 +1476,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param length the maximum number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNClob(int parameterIndex, Reader x, long length) public void setNClob(int parameterIndex, Reader x, long length)
throws SQLException { throws SQLException {
try { try {
......
...@@ -3096,7 +3096,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3096,7 +3096,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param x the value * @param x the value
* @throws SQLException if the result set is closed or not updatable * @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNString(int columnIndex, String x) throws SQLException { public void updateNString(int columnIndex, String x) throws SQLException {
try { try {
if (isDebugEnabled()) { if (isDebugEnabled()) {
...@@ -3108,7 +3107,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3108,7 +3107,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Updates a column in the current or insert row. * Updates a column in the current or insert row.
...@@ -3117,7 +3115,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3117,7 +3115,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param x the value * @param x the value
* @throws SQLException if the result set is closed or not updatable * @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNString(String columnLabel, String x) throws SQLException { public void updateNString(String columnLabel, String x) throws SQLException {
try { try {
if (isDebugEnabled()) { if (isDebugEnabled()) {
...@@ -3129,7 +3126,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3129,7 +3126,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* [Not supported] * [Not supported]
...@@ -3141,43 +3137,52 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3141,43 +3137,52 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
//*/ //*/
/** /**
* [Not supported] * Updates a column in the current or insert row.
*
* @param columnIndex (1,2,...)
* @param x the value
* @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNClob(int columnIndex, Reader x) throws SQLException { public void updateNClob(int columnIndex, Reader x) throws SQLException {
throw unsupported("NClob"); updateClob(columnIndex, x, -1);
} }
//*/
/** /**
* [Not supported] * Updates a column in the current or insert row.
*
* @param columnIndex (1,2,...)
* @param x the value
* @param length the length
* @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNClob(int columnIndex, Reader x, long length) public void updateNClob(int columnIndex, Reader x, long length)
throws SQLException { throws SQLException {
throw unsupported("NClob"); updateClob(columnIndex, x, length);
} }
//*/
/** /**
* [Not supported] * Updates a column in the current or insert row.
*
* @param columnLabel the column label
* @param x the value
* @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ## public void updateNClob(String columnLabel, Reader x) throws SQLException {
public void updateNClob(String columnLabel, Reader x) updateClob(columnLabel, x, -1);
throws SQLException {
throw unsupported("NClob");
} }
//*/
/** /**
* [Not supported] * Updates a column in the current or insert row.
*
* @param columnLabel the column label
* @param x the value
* @param length the length
* @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNClob(String columnLabel, Reader x, long length) public void updateNClob(String columnLabel, Reader x, long length)
throws SQLException { throws SQLException {
throw unsupported("NClob"); updateClob(columnLabel, x, length);
} }
//*/
/** /**
* [Not supported] * [Not supported]
...@@ -3188,7 +3193,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3188,7 +3193,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
//*/ //*/
/** /**
* Returns the value of the specified column as a Clob. * Returns the value of the specified column as a Clob.
* *
...@@ -3275,7 +3279,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3275,7 +3279,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public String getNString(int columnIndex) throws SQLException { public String getNString(int columnIndex) throws SQLException {
try { try {
debugCodeCall("getNString", columnIndex); debugCodeCall("getNString", columnIndex);
...@@ -3284,7 +3287,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3284,7 +3287,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Returns the value of the specified column as a String. * Returns the value of the specified column as a String.
...@@ -3294,7 +3296,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3294,7 +3296,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public String getNString(String columnLabel) throws SQLException { public String getNString(String columnLabel) throws SQLException {
try { try {
debugCodeCall("getNString", columnLabel); debugCodeCall("getNString", columnLabel);
...@@ -3303,7 +3304,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3303,7 +3304,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Returns the value of the specified column as a reader. * Returns the value of the specified column as a reader.
...@@ -3313,7 +3313,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3313,7 +3313,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public Reader getNCharacterStream(int columnIndex) throws SQLException { public Reader getNCharacterStream(int columnIndex) throws SQLException {
try { try {
debugCodeCall("getNCharacterStream", columnIndex); debugCodeCall("getNCharacterStream", columnIndex);
...@@ -3322,7 +3321,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3322,7 +3321,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Returns the value of the specified column as a reader. * Returns the value of the specified column as a reader.
...@@ -3332,7 +3330,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3332,7 +3330,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
*/ */
//## Java 1.6 ##
public Reader getNCharacterStream(String columnLabel) throws SQLException { public Reader getNCharacterStream(String columnLabel) throws SQLException {
try { try {
debugCodeCall("getNCharacterStream", columnLabel); debugCodeCall("getNCharacterStream", columnLabel);
...@@ -3341,7 +3338,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3341,7 +3338,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Updates a column in the current or insert row. * Updates a column in the current or insert row.
...@@ -3350,12 +3346,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3350,12 +3346,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param x the value * @param x the value
* @throws SQLException if the result set is closed or not updatable * @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNCharacterStream(int columnIndex, Reader x) public void updateNCharacterStream(int columnIndex, Reader x)
throws SQLException { throws SQLException {
updateNCharacterStream(columnIndex, x, -1); updateNCharacterStream(columnIndex, x, -1);
} }
//*/
/** /**
* Updates a column in the current or insert row. * Updates a column in the current or insert row.
...@@ -3365,7 +3359,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3365,7 +3359,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param length the number of characters * @param length the number of characters
* @throws SQLException if the result set is closed or not updatable * @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNCharacterStream(int columnIndex, Reader x, long length) public void updateNCharacterStream(int columnIndex, Reader x, long length)
throws SQLException { throws SQLException {
try { try {
...@@ -3379,7 +3372,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3379,7 +3372,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Updates a column in the current or insert row. * Updates a column in the current or insert row.
...@@ -3388,12 +3380,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3388,12 +3380,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param x the value * @param x the value
* @throws SQLException if the result set is closed or not updatable * @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNCharacterStream(String columnLabel, Reader x) public void updateNCharacterStream(String columnLabel, Reader x)
throws SQLException { throws SQLException {
updateNCharacterStream(columnLabel, x, -1); updateNCharacterStream(columnLabel, x, -1);
} }
//*/
/** /**
* Updates a column in the current or insert row. * Updates a column in the current or insert row.
...@@ -3403,7 +3393,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3403,7 +3393,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param length the number of characters * @param length the number of characters
* @throws SQLException if the result set is closed or not updatable * @throws SQLException if the result set is closed or not updatable
*/ */
//## Java 1.6 ##
public void updateNCharacterStream(String columnLabel, Reader x, long length) public void updateNCharacterStream(String columnLabel, Reader x, long length)
throws SQLException { throws SQLException {
try { try {
...@@ -3417,7 +3406,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3417,7 +3406,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论