Code review request to remove javadoc build warnings from javax.sql.rowset.BaseRowSet.java
Lance J. Andersen
Lance.Andersen at Sun.COM
Fri Aug 28 01:58:16 UTC 2009
Andrew John Hughes wrote:
> 2009/8/28 Joseph D. Darcy <Joe.Darcy at sun.com>:
>
>> Hello.
>>
>> More cleanup of docs build warnings; this time from
>> javax.sql.rowset.BaseRowSet.java where non-existent getter methods are
>> repeatedly referenced. Assuming someone approves the change, I'll file a
>> bug and commit the fix.
>>
>> -Joe
>>
>> --- old/src/share/classes/javax/sql/rowset/BaseRowSet.java 2009-08-27
>> 18:04:08.000000000 -0700
>> +++ new/src/share/classes/javax/sql/rowset/BaseRowSet.java 2009-08-27
>> 18:04:08.000000000 -0700
>> @@ -168,8 +168,8 @@
>> * The majority of methods for setting placeholder parameters take two
>> parameters,
>> * with the first parameter
>> * indicating which placeholder parameter is to be set, and the second
>> parameter
>> - * giving the value to be set. Methods such as <code>getInt</code>,
>> - * <code>getString</code>, <code>getBoolean</code>, and
>> <code>getLong</code> fall into
>> + * giving the value to be set. Methods such as <code>setInt</code>,
>> + * <code>setString</code>, <code>setBoolean</code>, and
>> <code>setLong</code> fall into
>> * this category. After these methods have been called, a call to the
>> method
>> * <code>getParams</code> will return an array with the values that have
>> been set. Each
>> * element in the array is an <code>Object</code> instance representing the
>> @@ -3259,7 +3259,6 @@
>> * @param x the parameter value
>> * @exception SQLException if a database access error occurs or
>> * this method is called on a closed <code>CallableStatement</code>
>> - * @see #getBoolean
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> * @since 1.4
>> @@ -3281,7 +3280,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getByte
>> * @since 1.4
>> */
>> public void setByte(String parameterName, byte x) throws SQLException{
>> @@ -3301,7 +3299,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getShort
>> * @since 1.4
>> */
>> public void setShort(String parameterName, short x) throws SQLException{
>> @@ -3320,7 +3317,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getInt
>> * @since 1.4
>> */
>> public void setInt(String parameterName, int x) throws SQLException{
>> @@ -3339,7 +3335,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getLong
>> * @since 1.4
>> */
>> public void setLong(String parameterName, long x) throws SQLException{
>> @@ -3358,7 +3353,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getFloat
>> * @since 1.4
>> */
>> public void setFloat(String parameterName, float x) throws SQLException{
>> @@ -3377,7 +3371,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getDouble
>> * @since 1.4
>> */
>> public void setDouble(String parameterName, double x) throws SQLException{
>> @@ -3398,7 +3391,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getBigDecimal
>> * @since 1.4
>> */
>> public void setBigDecimal(String parameterName, BigDecimal x) throws
>> SQLException{
>> @@ -3421,7 +3413,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getString
>> * @since 1.4
>> */
>> public void setString(String parameterName, String x) throws SQLException{
>> @@ -3443,7 +3434,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getBytes
>> * @since 1.4
>> */
>> public void setBytes(String parameterName, byte x[]) throws SQLException{
>> @@ -3464,7 +3454,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getTimestamp
>> * @since 1.4
>> */
>> public void setTimestamp(String parameterName, java.sql.Timestamp x)
>> @@ -3712,7 +3701,6 @@
>> * or <code>STRUCT</code> data type and the JDBC driver does not support
>> * this data type
>> * @see Types
>> - * @see #getObject
>> * @since 1.4
>> */
>> public void setObject(String parameterName, Object x, int targetSqlType,
>> int scale)
>> @@ -3740,7 +3728,6 @@
>> * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
>> * or <code>STRUCT</code> data type and the JDBC driver does not support
>> * this data type
>> - * @see #getObject
>> * @since 1.4
>> */
>> public void setObject(String parameterName, Object x, int targetSqlType)
>> @@ -3782,7 +3769,6 @@
>> * <code>Object</code> parameter is ambiguous
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getObject
>> * @since 1.4
>> */
>> public void setObject(String parameterName, Object x) throws SQLException{
>> @@ -4064,7 +4050,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getDate
>> * @since 1.4
>> */
>> public void setDate(String parameterName, java.sql.Date x)
>> @@ -4091,7 +4076,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getDate
>> * @since 1.4
>> */
>> public void setDate(String parameterName, java.sql.Date x, Calendar cal)
>> @@ -4111,7 +4095,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getTime
>> * @since 1.4
>> */
>> public void setTime(String parameterName, java.sql.Time x)
>> @@ -4138,7 +4121,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getTime
>> * @since 1.4
>> */
>> public void setTime(String parameterName, java.sql.Time x, Calendar cal)
>> @@ -4165,7 +4147,6 @@
>> * this method is called on a closed <code>CallableStatement</code>
>> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
>> support
>> * this method
>> - * @see #getTimestamp
>> * @since 1.4
>> */
>> public void setTimestamp(String parameterName, java.sql.Timestamp x,
>> Calendar cal)
>>
>>
>>
>
>
> Thanks for this. The initial paragraph is particularly confusing at
> present, referring to non-existent methods call getX in the context of
> discussing setter methods.
>
> I think the #getX references should actually point to #getParams
> rather than being removed. From the documentation:
>
> 'A call to the method getParams returns the values stored in the
> Hashtable object as an array of Object instances. An element in this
> array may be a simple Object instance or an array (which is a type of
> Object). The particular setter method used determines whether an
> element in this array is an Object or an array.'
>
Right this is why I have go to back and look at this closer to see what
might have happened here.
-lance
> So the code that would perform the equivalent of a getDate method
> would be getParams()[n], where n is the integer passed to the setDate
> method.
>
> Thanks again,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20090827/add17dea/attachment.html>
More information about the core-libs-dev
mailing list