提交 661b12bb authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved javadoc documentation.

上级 240ec323
...@@ -293,6 +293,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -293,6 +293,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @deprecated * @deprecated
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param scale is ignored
* @return the value * @return the value
* @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
...@@ -970,7 +971,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -970,7 +971,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setCharacterStream(String parameterName, Reader x, int length) throws SQLException { public void setCharacterStream(String parameterName, Reader x, int length) throws SQLException {
...@@ -1025,7 +1026,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1025,7 +1026,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException { public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
...@@ -1039,7 +1040,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1039,7 +1040,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setAsciiStream(String parameterName, public void setAsciiStream(String parameterName,
...@@ -1228,7 +1229,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1228,7 +1229,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 begin ## //## Java 1.6 begin ##
...@@ -1259,6 +1260,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1259,6 +1260,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 begin ## //## Java 1.6 begin ##
...@@ -1275,6 +1277,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1275,6 +1277,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 begin ## //## Java 1.6 begin ##
...@@ -1291,6 +1294,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1291,6 +1294,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 begin ## //## Java 1.6 begin ##
...@@ -1350,7 +1354,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1350,7 +1354,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setAsciiStream(String parameterName, public void setAsciiStream(String parameterName,
...@@ -1381,7 +1385,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1381,7 +1385,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the 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 begin ## //## Java 1.6 begin ##
...@@ -1430,7 +1434,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1430,7 +1434,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterName the parameter name * @param parameterName the parameter name
* @param x the value * @param x the value
* @param length the 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 begin ## //## Java 1.6 begin ##
......
...@@ -171,6 +171,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -171,6 +171,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/** /**
* Creates a statement with the specified result set type and concurrency. * Creates a statement with the specified result set type and concurrency.
* *
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @return the statement * @return the statement
* @throws SQLException * @throws SQLException
* if the connection is closed or the result set type or * if the connection is closed or the result set type or
...@@ -194,6 +196,9 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -194,6 +196,9 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a statement with the specified result set type, concurrency, and * Creates a statement with the specified result set type, concurrency, and
* holdability. * holdability.
* *
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @param resultSetHoldability the holdability (ResultSet.HOLD* / CLOSE*)
* @return the statement * @return the statement
* @throws SQLException if the connection is closed or the result set type, * @throws SQLException if the connection is closed or the result set type,
* concurrency, or holdability are not supported * concurrency, or holdability are not supported
...@@ -218,6 +223,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -218,6 +223,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/** /**
* Creates a new prepared statement. * Creates a new prepared statement.
* *
* @param sql the SQL statement
* @return the prepared statement * @return the prepared statement
* @throws SQLException * @throws SQLException
* if the connection is closed * if the connection is closed
...@@ -240,7 +246,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -240,7 +246,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* Prepare a statement that will automatically close when the result set is * Prepare a statement that will automatically close when the result set is
* closed. This method is used to retrieve database meta data. * closed. This method is used to retrieve database meta data.
* *
* @param sql the SQL statement. * @param sql the SQL statement
* @return the prepared statement * @return the prepared statement
*/ */
PreparedStatement prepareAutoCloseStatement(String sql) throws SQLException { PreparedStatement prepareAutoCloseStatement(String sql) throws SQLException {
...@@ -445,6 +451,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -445,6 +451,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/** /**
* Translates a SQL statement into the database grammar. * Translates a SQL statement into the database grammar.
* *
* @param sql the SQL statement with or without JDBC escape sequences
* @return the translated statement * @return the translated statement
* @throws SQLException * @throws SQLException
* if the connection is closed * if the connection is closed
...@@ -464,6 +471,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -464,6 +471,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* setting is only a hint to the database to enable optimizations - it does * setting is only a hint to the database to enable optimizations - it does
* not cause writes to be prohibited. * not cause writes to be prohibited.
* *
* @param readOnly ignored
* @throws SQLException * @throws SQLException
* if the connection is closed * if the connection is closed
*/ */
...@@ -503,6 +511,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -503,6 +511,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* Set the default catalog name. * Set the default catalog name.
* This call is ignored. * This call is ignored.
* *
* @param catalog ignored
* @throws SQLException if the connection is closed * @throws SQLException if the connection is closed
*/ */
public void setCatalog(String catalog) throws SQLException { public void setCatalog(String catalog) throws SQLException {
...@@ -568,6 +577,9 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -568,6 +577,9 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a prepared statement with the specified result set type and * Creates a prepared statement with the specified result set type and
* concurrency. * concurrency.
* *
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @return the prepared statement * @return the prepared statement
* @throws SQLException * @throws SQLException
* if the connection is closed or the result set type or * if the connection is closed or the result set type or
...@@ -784,6 +796,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -784,6 +796,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/** /**
* Creates a new callable statement. * Creates a new callable statement.
* *
* @param sql the SQL statement
* @return the callable statement * @return the callable statement
* @throws SQLException * @throws SQLException
* if the connection is closed or the statement is not valid * if the connection is closed or the statement is not valid
...@@ -806,6 +819,9 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -806,6 +819,9 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a callable statement with the specified result set type and * Creates a callable statement with the specified result set type and
* concurrency. * concurrency.
* *
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @return the callable statement * @return the callable statement
* @throws SQLException * @throws SQLException
* if the connection is closed or the result set type or * if the connection is closed or the result set type or
...@@ -830,6 +846,10 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -830,6 +846,10 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a callable statement with the specified result set type, * Creates a callable statement with the specified result set type,
* concurrency, and holdability. * concurrency, and holdability.
* *
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @param resultSetHoldability the holdability (ResultSet.HOLD* / CLOSE*)
* @return the callable statement * @return the callable statement
* @throws SQLException * @throws SQLException
* if the connection is closed or the result set type, * if the connection is closed or the result set type,
...@@ -952,6 +972,10 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -952,6 +972,10 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a prepared statement with the specified result set type, * Creates a prepared statement with the specified result set type,
* concurrency, and holdability. * concurrency, and holdability.
* *
* @param sql the SQL statement
* @param resultSetType the result set type (ResultSet.TYPE_*)
* @param resultSetConcurrency the concurrency (ResultSet.CONCUR_*)
* @param resultSetHoldability the holdability (ResultSet.HOLD* / CLOSE*)
* @return the prepared statement * @return the prepared statement
* @throws SQLException if the connection is closed or the result set type, * @throws SQLException if the connection is closed or the result set type,
* concurrency, or holdability are not supported * concurrency, or holdability are not supported
...@@ -975,9 +999,12 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -975,9 +999,12 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
/** /**
* Creates a new prepared statement. This method just calls * Creates a new prepared statement.
* prepareStatement(String sql). * This method just calls prepareStatement(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the prepared statement * @return the prepared statement
* @throws SQLException * @throws SQLException
* if the connection is closed * if the connection is closed
...@@ -994,9 +1021,12 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -994,9 +1021,12 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
/** /**
* Creates a new prepared statement. This method just calls * Creates a new prepared statement.
* prepareStatement(String sql). * This method just calls prepareStatement(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement
* @param columnIndexes ignored
* @return the prepared statement * @return the prepared statement
* @throws SQLException * @throws SQLException
* if the connection is closed * if the connection is closed
...@@ -1013,9 +1043,12 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1013,9 +1043,12 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
/** /**
* Creates a new prepared statement. This method just calls * Creates a new prepared statement.
* prepareStatement(String sql). * This method just calls prepareStatement(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement
* @param columnNames ignored
* @return the prepared statement * @return the prepared statement
* @throws SQLException * @throws SQLException
* if the connection is closed * if the connection is closed
......
...@@ -216,6 +216,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -216,6 +216,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public ResultSet executeQuery(String sql) throws SQLException { public ResultSet executeQuery(String sql) throws SQLException {
...@@ -230,6 +231,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -230,6 +231,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public void addBatch(String sql) throws SQLException { public void addBatch(String sql) throws SQLException {
...@@ -244,6 +246,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -244,6 +246,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public int executeUpdate(String sql) throws SQLException { public int executeUpdate(String sql) throws SQLException {
...@@ -258,6 +261,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -258,6 +261,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public boolean execute(String sql) throws SQLException { public boolean execute(String sql) throws SQLException {
...@@ -664,6 +668,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -664,6 +668,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* [Not supported] This feature is deprecated and not supported. * [Not supported] This feature is deprecated and not supported.
*
* @deprecated * @deprecated
*/ */
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException { public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
...@@ -837,7 +842,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -837,7 +842,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
...@@ -864,7 +869,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -864,7 +869,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
...@@ -891,7 +896,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -891,7 +896,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
...@@ -905,7 +910,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -905,7 +910,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of bytes * @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
...@@ -945,7 +950,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -945,7 +950,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setCharacterStream(int parameterIndex, Reader x, int length) throws SQLException { public void setCharacterStream(int parameterIndex, Reader x, int length) throws SQLException {
...@@ -972,7 +977,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -972,7 +977,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException { public void setCharacterStream(int parameterIndex, Reader x, long length) throws SQLException {
...@@ -1146,6 +1151,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1146,6 +1151,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @param autoGeneratedKeys ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
...@@ -1161,6 +1168,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1161,6 +1168,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @param columnIndexes ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
...@@ -1175,6 +1184,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1175,6 +1184,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @param columnNames ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public int executeUpdate(String sql, String[] columnNames) throws SQLException { public int executeUpdate(String sql, String[] columnNames) throws SQLException {
...@@ -1189,6 +1200,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1189,6 +1200,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @param autoGeneratedKeys ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
...@@ -1203,6 +1216,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1203,6 +1216,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @param columnIndexes ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public boolean execute(String sql, int[] columnIndexes) throws SQLException { public boolean execute(String sql, int[] columnIndexes) throws SQLException {
...@@ -1217,6 +1232,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1217,6 +1232,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* Calling this method is not legal on a PreparedStatement. * Calling this method is not legal on a PreparedStatement.
* *
* @param sql ignored
* @param columnNames ignored
* @throws SQLException Unsupported Feature * @throws SQLException Unsupported Feature
*/ */
public boolean execute(String sql, String[] columnNames) throws SQLException { public boolean execute(String sql, String[] columnNames) throws SQLException {
...@@ -1300,7 +1317,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1300,7 +1317,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the 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 begin ## //## Java 1.6 begin ##
...@@ -1402,7 +1419,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1402,7 +1419,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the number of characters * @param length the maximum number of characters
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setClob(int parameterIndex, Reader x, long length) throws SQLException { public void setClob(int parameterIndex, Reader x, long length) throws SQLException {
...@@ -1429,6 +1446,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1429,6 +1446,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the maximum number of bytes
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
public void setBlob(int parameterIndex, InputStream x, long length) throws SQLException { public void setBlob(int parameterIndex, InputStream x, long length) throws SQLException {
...@@ -1455,7 +1473,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1455,7 +1473,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param x the value * @param x the value
* @param length the 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 begin ## //## Java 1.6 begin ##
......
...@@ -699,6 +699,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -699,6 +699,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @deprecated * @deprecated
* *
* @param columnLabel the column label * @param columnLabel the column label
* @param scale the scale of the returned value
* @return the value * @return the value
* @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
...@@ -724,6 +725,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -724,6 +725,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @deprecated * @deprecated
* *
* @param columnIndex (1,2,...) * @param columnIndex (1,2,...)
* @param scale the scale of the returned value
* @return the value * @return the value
* @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
......
...@@ -705,9 +705,11 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -705,9 +705,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* Executes a statement and returns the update count. * Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql). * This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement * @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the update count (number of row affected by an insert, * @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a * update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback) * create, drop, commit or rollback)
...@@ -727,9 +729,11 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -727,9 +729,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* Executes a statement and returns the update count. * Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql). * This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement * @param sql the SQL statement
* @param columnIndexes ignored
* @return the update count (number of row affected by an insert, * @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a * update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback) * create, drop, commit or rollback)
...@@ -749,9 +753,11 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -749,9 +753,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* Executes a statement and returns the update count. * Executes a statement and returns the update count.
* This method just calls executeUpdate(String sql). * This method just calls executeUpdate(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement * @param sql the SQL statement
* @param columnNames ignored
* @return the update count (number of row affected by an insert, * @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a * update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback) * create, drop, commit or rollback)
...@@ -771,9 +777,11 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -771,9 +777,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* Executes a statement and returns the update count. * Executes a statement and returns the update count.
* This method just calls execute(String sql). * This method just calls execute(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement * @param sql the SQL statement
* @param autoGeneratedKeys ignored
* @return the update count (number of row affected by an insert, * @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a * update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback) * create, drop, commit or rollback)
...@@ -793,9 +801,11 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -793,9 +801,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* Executes a statement and returns the update count. * Executes a statement and returns the update count.
* This method just calls execute(String sql). * This method just calls execute(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement * @param sql the SQL statement
* @param columnIndexes ignored
* @return the update count (number of row affected by an insert, * @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a * update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback) * create, drop, commit or rollback)
...@@ -815,9 +825,11 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -815,9 +825,11 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* Executes a statement and returns the update count. * Executes a statement and returns the update count.
* This method just calls execute(String sql). * This method just calls execute(String sql) internally.
* The method getGeneratedKeys only supports one column.
* *
* @param sql the SQL statement * @param sql the SQL statement
* @param columnNames ignored
* @return the update count (number of row affected by an insert, * @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a * update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback) * create, drop, commit or rollback)
......
...@@ -1027,6 +1027,7 @@ public abstract class Value { ...@@ -1027,6 +1027,7 @@ public abstract class Value {
/** /**
* Throw the exception that the feature is not support for the given data type. * Throw the exception that the feature is not support for the given data type.
* *
* @param op the operation
* @return never returns normally * @return never returns normally
* @throws the exception * @throws the exception
*/ */
......
...@@ -260,60 +260,57 @@ public abstract class TestBase { ...@@ -260,60 +260,57 @@ public abstract class TestBase {
} }
if (!config.memory) { if (!config.memory) {
if (config.smallLog && admin) { if (config.smallLog && admin) {
url += ";MAX_LOG_SIZE=1"; url = addOption(url, "MAX_LOG_SIZE", "1");
} }
} }
if (config.traceSystemOut) { if (config.traceSystemOut) {
url += ";TRACE_LEVEL_SYSTEM_OUT=2"; url = addOption(url, "TRACE_LEVEL_SYSTEM_OUT", "2");
} }
if (config.traceLevelFile > 0 && admin) { if (config.traceLevelFile > 0 && admin) {
if (url.indexOf(";TRACE_LEVEL_FILE=") < 0) { url = addOption(url, "TRACE_LEVEL_FILE", "" + config.traceLevelFile);
url += ";TRACE_LEVEL_FILE=" + config.traceLevelFile; url = addOption(url, "TRACE_MAX_FILE_SIZE", "8");
}
if (url.indexOf(";TRACE_MAX_FILE_SIZE=") < 0) {
url += ";TRACE_MAX_FILE_SIZE=8";
}
}
if (url.indexOf(";LOG=") < 0) {
url += ";LOG=1";
} }
url = addOption(url, "LOG", "1");
if (config.throttle > 0) { if (config.throttle > 0) {
url += ";THROTTLE=" + config.throttle; url = addOption(url, "THROTTLE", "" + config.throttle);
}
if (url.indexOf(";LOCK_TIMEOUT=") < 0) {
url += ";LOCK_TIMEOUT=50";
} }
url = addOption(url, "LOCK_TIMEOUT", "50");
if (config.diskUndo && admin) { if (config.diskUndo && admin) {
url += ";MAX_MEMORY_UNDO=3"; url = addOption(url, "MAX_MEMORY_UNDO", "3");
} }
if (config.big && admin && url.indexOf(";MAX_OPERATION_MEMORY=") <= 0) { if (config.big && admin) {
// force operations to disk // force operations to disk
url += ";MAX_OPERATION_MEMORY=1"; url = addOption(url, "MAX_OPERATION_MEMORY", "1");
} }
if (config.mvcc && url.indexOf(";MVCC=") < 0) { if (config.mvcc) {
url += ";MVCC=TRUE"; url = addOption(url, "MVCC", "TRUE");
} }
if (config.cacheType != null && admin && url.indexOf(";CACHE_TYPE=") < 0) { if (config.cacheType != null && admin) {
url += ";CACHE_TYPE=" + config.cacheType; url = addOption(url, "CACHE_TYPE", config.cacheType);
} }
if (config.diskResult && admin) { if (config.diskResult && admin) {
url += ";MAX_MEMORY_ROWS=100"; url = addOption(url, "MAX_MEMORY_ROWS", "100");
if (url.indexOf(";CACHE_SIZE=") < 0) { url = addOption(url, "CACHE_SIZE", "0");
url += ";CACHE_SIZE=0";
}
} }
if (config.cipher != null) { if (config.cipher != null) {
url += ";CIPHER=" + config.cipher; url = addOption(url, "CIPHER", config.cipher);
} }
if (config.defrag) { if (config.defrag) {
url += ";DEFRAG_ALWAYS=TRUE"; url = addOption(url, "DEFRAG_ALWAYS", "TRUE");
} }
if (config.nestedJoins) { if (config.nestedJoins) {
url += ";NESTED_JOINS=TRUE"; url = addOption(url, "NESTED_JOINS", "TRUE");
} }
return "jdbc:h2:" + url; return "jdbc:h2:" + url;
} }
private String addOption(String url, String option, String value) {
if (url.indexOf(";" + option + "=") < 0) {
url += ";" + option + "=" + value;
}
return url;
}
private Connection getConnectionInternal(String url, String user, String password) throws SQLException { private Connection getConnectionInternal(String url, String user, String password) throws SQLException {
org.h2.Driver.load(); org.h2.Driver.load();
// url += ";DEFAULT_TABLE_TYPE=1"; // url += ";DEFAULT_TABLE_TYPE=1";
...@@ -584,6 +581,7 @@ public abstract class TestBase { ...@@ -584,6 +581,7 @@ public abstract class TestBase {
* *
* @param expected the expected value * @param expected the expected value
* @param actual the actual value * @param actual the actual value
* @param len the maximum length, or -1
* @throws AssertionError if the values are not equal * @throws AssertionError if the values are not equal
*/ */
protected void assertEqualReaders(Reader expected, Reader actual, int len) throws IOException { protected void assertEqualReaders(Reader expected, Reader actual, int len) throws IOException {
...@@ -604,6 +602,7 @@ public abstract class TestBase { ...@@ -604,6 +602,7 @@ public abstract class TestBase {
* *
* @param expected the expected value * @param expected the expected value
* @param actual the actual value * @param actual the actual value
* @param len the maximum length, or -1
* @throws AssertionError if the values are not equal * @throws AssertionError if the values are not equal
*/ */
protected void assertEqualStreams(InputStream expected, InputStream actual, int len) throws IOException { protected void assertEqualStreams(InputStream expected, InputStream actual, int len) throws IOException {
......
...@@ -305,9 +305,8 @@ public class Doclet { ...@@ -305,9 +305,8 @@ public class Doclet {
ThrowsTag[] throwsTags = method.throwsTags(); ThrowsTag[] throwsTags = method.throwsTags();
boolean hasThrowsTag = throwsTags != null && throwsTags.length > 0; boolean hasThrowsTag = throwsTags != null && throwsTags.length > 0;
if (paramTags.length != params.length) { if (paramTags.length != params.length) {
if (hasComment && !method.commentText().startsWith("[") && !hasThrowsTag) { if (hasComment && !method.commentText().startsWith("[")) {
// [Not supported] and such are not problematic // [Not supported] and such are not problematic
// also not problematic are methods that always throw an exception
addError("Undocumented parameter(s) (" + addError("Undocumented parameter(s) (" +
clazz.name() + ".java:" + method.position().line() + ") " + name + " documented: " + paramTags.length + " params: "+ params.length); clazz.name() + ".java:" + method.position().line() + ") " + name + " documented: " + paramTags.length + " params: "+ params.length);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论