The following are comments for clarification from Chris Farar from IBM for RowSet.java.
(###@###.###)
These were requested for clarification at the JDBC 4.0 Expert Group.
15) RowSet: setUrl(java.lang.String url): The statement
If a URL is used, a JDBC driver that accepts the URL must be loaded by the application
before the rowset is used to connect to a database.
Wont be true in JDBC 4.0; to fix this the phrase by the application should be removed.
16) FUNCTION: RowSet: setUrl: The statement
Either a URL or a data source name is used to create a connection, whichever was
specified most recently.
seems an odd mechanism. More useful would be
... whichever was set to a non-null value most recently.
But, I have no idea what current implementations of RowSet do.... If this specification were to
change it would also impact the text now in getDataSourceName.
17) RowSet: getDataSourceName(): In the detail description:
Retrieves the logical name that identifies the data source for this RowSet object. Users
should set either the url property or the data source name property. The rowset will use
the property that was set more recently to get a connection.
The last two sentences are more applicable to the setXXX method than this getXXX method.
18) Little Inconsistencies; RowSet why is it that setUrl says: Parameters:
url - a string value; may be null
whereas setDataSourceName says: Parameters:
name - the logical name of the data source for this RowSet object
omitting ; may be null? Is this parameter not allowed to be null?
Consider adding ; may be null
19) FUNCTION/Question: RowSet: I always have problems with descriptions like that for
setReadOnly(boolean value):
Sets whether this RowSet object is read-only to the given boolean.
Isnt it true that all this method does is to make sure that Connection.setReadOnly(boolean
readOnly) is called prior to executing the SQL command? And, so all it does is to set a hint.
OR, is it intended that this method be able to transform its underlying ResultSet from read-only
to updateable or vice-versa??
20) MULTIPLE: FUNCTION/Question: RowSet: similar concern for
setMaxFieldSize(int max),
setMaxRows(int max),
setType(int type),
setConcurrency(int concurrency)
where I want to assume that none of the above have any impact on an underlying ResultSet that
was already built, but only impacts future underlying ResultSets.
The problem I have with my desired assumption is that some of the above methods explicitly
disavow it. For example: setConcurrency(int concurrency) which says
Sets the concurrency of this RowSet object to the given concurrency level.
BUT, note that one cant change the concurrency of the underlying ResultSet (they have no
setConcurrency method). So, what is changing this RowSets concurrency supposed to do?
Please clarify.
21) MULTIPLE: RowSet: getMaxFieldSize() and setMaxFieldSize(int max), their respective
versions of the statement:
This limit applies only to BINARY, VARBINARY, LONGVARBINARYBINARY,
CHAR, VARCHAR, and LONGVARCHAR columns.
need to be updated for the NATIONAL types.
22) RowSet: setBoolean(int parameterIndex, boolean x), as with ResultSet, I believe there should
be some loosening of the phrase
The driver converts this to an SQL BIT value
to allow for the possible native support of an SQL BOOLEAN value. Whatever change was made
in response to that earlier issue related to PreparedStatement and CallableStatement is probably
appropriate here.
23) MULTIPLE: RowSet: setObject(int parameterIndex, java.lang.Object x, int targetSqlType,
int scale), and
setObject(int parameterIndex, java.lang.Object x)
the descriptions:
If the object is an instance of a class implementing the Ref, Struct, Array,
Blob, or Clob interfaces, the driver uses the default mapping to the corresponding
SQL type.
needs to be expanded to include the new JDBC 4.0 classes... At least NClob.
My very first set of comments mentioned both URL and NClob (for CallableStatement and
PreparedStatement) BUT, I find myself unsure if URL should be in that list or not.... Though Im
leaning towards not
Your opinions?? Or course, whatever is done for setObject here should be what is done for
setObject elsewhere.
24) RowSet: setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale),
In PreparedStatement, the last parameter is renamed scaleOrLength, and related changes are
made to explain OrLength. Similar changes should appear here.
25) FUNCTION(?) RowSet: Why doesnt the sentence
If the object is an instance of a class implementing the Ref, Struct, Array,
Blob, or Clob interfaces, the driver uses the default mapping to the corresponding
SQL type.
appear in all descriptions of setObject? Is it only meant to apply for those methods that the
descriptions that it does appear in? OR, is it not meant to be included in methods for which a
targetSqlType is provided? OR ???
A similar question/issue applies to CallableStatement and PreparedStatement, but I dont believe
I raised one.
26) RowSetListener: Method rowSetChanged(RowSetEvent event), description:
Notifies registered listeners that a RowSet object in the given RowSetEvent object
has changed its entire contents.
Is there any event other than RowSet.execute() that can cause a change in the entire contents? It
just seems that the description of this method could be more precise. For an example, does
changing one row in a one-row RowSet cause this event to occur?
27) FUNCTION: RowSetListener: Method cursorMoved(RowSetEvent event), description:
Notifies registered listeners that a RowSet object's cursor has moved.
Picking on small points, but is it that the cursor did move, or is it that a method that normally
moves the cursor was invoked. E.g., if the cursor happens to be on the First row of the RowSet
and its first() method is invoked, is that to cause a cursorMoved event? The answer to this
question could impact applications, and I can easily believe implementations would not go to the
extra trouble of determining if the cursor is currently on the first, or the last, or row whose
absolute position is what was mentioned in an absolute(), etc....
28) FUNCTION: rowChanged(RowSetEvent event), description:
Notifies registered listeners that a RowSet object has had a change in one of its rows.
Similar question... IF an update operation change a value to itself is a rowChanged event
supposed to occur?
29) RowSetMetaData: setAutoIncrement(int columnIndex, boolean property), as mentioned in an
earlier ResultSetMetaData issue, the fact that a column is auto-increment does not necessarily
make it read-only. The descriptions phrase , and thus read-only should be removed or
qualified... However the earlier issue was addressed.
(###@###.###)
These were requested for clarification at the JDBC 4.0 Expert Group.
15) RowSet: setUrl(java.lang.String url): The statement
If a URL is used, a JDBC driver that accepts the URL must be loaded by the application
before the rowset is used to connect to a database.
Wont be true in JDBC 4.0; to fix this the phrase by the application should be removed.
16) FUNCTION: RowSet: setUrl: The statement
Either a URL or a data source name is used to create a connection, whichever was
specified most recently.
seems an odd mechanism. More useful would be
... whichever was set to a non-null value most recently.
But, I have no idea what current implementations of RowSet do.... If this specification were to
change it would also impact the text now in getDataSourceName.
17) RowSet: getDataSourceName(): In the detail description:
Retrieves the logical name that identifies the data source for this RowSet object. Users
should set either the url property or the data source name property. The rowset will use
the property that was set more recently to get a connection.
The last two sentences are more applicable to the setXXX method than this getXXX method.
18) Little Inconsistencies; RowSet why is it that setUrl says: Parameters:
url - a string value; may be null
whereas setDataSourceName says: Parameters:
name - the logical name of the data source for this RowSet object
omitting ; may be null? Is this parameter not allowed to be null?
Consider adding ; may be null
19) FUNCTION/Question: RowSet: I always have problems with descriptions like that for
setReadOnly(boolean value):
Sets whether this RowSet object is read-only to the given boolean.
Isnt it true that all this method does is to make sure that Connection.setReadOnly(boolean
readOnly) is called prior to executing the SQL command? And, so all it does is to set a hint.
OR, is it intended that this method be able to transform its underlying ResultSet from read-only
to updateable or vice-versa??
20) MULTIPLE: FUNCTION/Question: RowSet: similar concern for
setMaxFieldSize(int max),
setMaxRows(int max),
setType(int type),
setConcurrency(int concurrency)
where I want to assume that none of the above have any impact on an underlying ResultSet that
was already built, but only impacts future underlying ResultSets.
The problem I have with my desired assumption is that some of the above methods explicitly
disavow it. For example: setConcurrency(int concurrency) which says
Sets the concurrency of this RowSet object to the given concurrency level.
BUT, note that one cant change the concurrency of the underlying ResultSet (they have no
setConcurrency method). So, what is changing this RowSets concurrency supposed to do?
Please clarify.
21) MULTIPLE: RowSet: getMaxFieldSize() and setMaxFieldSize(int max), their respective
versions of the statement:
This limit applies only to BINARY, VARBINARY, LONGVARBINARYBINARY,
CHAR, VARCHAR, and LONGVARCHAR columns.
need to be updated for the NATIONAL types.
22) RowSet: setBoolean(int parameterIndex, boolean x), as with ResultSet, I believe there should
be some loosening of the phrase
The driver converts this to an SQL BIT value
to allow for the possible native support of an SQL BOOLEAN value. Whatever change was made
in response to that earlier issue related to PreparedStatement and CallableStatement is probably
appropriate here.
23) MULTIPLE: RowSet: setObject(int parameterIndex, java.lang.Object x, int targetSqlType,
int scale), and
setObject(int parameterIndex, java.lang.Object x)
the descriptions:
If the object is an instance of a class implementing the Ref, Struct, Array,
Blob, or Clob interfaces, the driver uses the default mapping to the corresponding
SQL type.
needs to be expanded to include the new JDBC 4.0 classes... At least NClob.
My very first set of comments mentioned both URL and NClob (for CallableStatement and
PreparedStatement) BUT, I find myself unsure if URL should be in that list or not.... Though Im
leaning towards not
Your opinions?? Or course, whatever is done for setObject here should be what is done for
setObject elsewhere.
24) RowSet: setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale),
In PreparedStatement, the last parameter is renamed scaleOrLength, and related changes are
made to explain OrLength. Similar changes should appear here.
25) FUNCTION(?) RowSet: Why doesnt the sentence
If the object is an instance of a class implementing the Ref, Struct, Array,
Blob, or Clob interfaces, the driver uses the default mapping to the corresponding
SQL type.
appear in all descriptions of setObject? Is it only meant to apply for those methods that the
descriptions that it does appear in? OR, is it not meant to be included in methods for which a
targetSqlType is provided? OR ???
A similar question/issue applies to CallableStatement and PreparedStatement, but I dont believe
I raised one.
26) RowSetListener: Method rowSetChanged(RowSetEvent event), description:
Notifies registered listeners that a RowSet object in the given RowSetEvent object
has changed its entire contents.
Is there any event other than RowSet.execute() that can cause a change in the entire contents? It
just seems that the description of this method could be more precise. For an example, does
changing one row in a one-row RowSet cause this event to occur?
27) FUNCTION: RowSetListener: Method cursorMoved(RowSetEvent event), description:
Notifies registered listeners that a RowSet object's cursor has moved.
Picking on small points, but is it that the cursor did move, or is it that a method that normally
moves the cursor was invoked. E.g., if the cursor happens to be on the First row of the RowSet
and its first() method is invoked, is that to cause a cursorMoved event? The answer to this
question could impact applications, and I can easily believe implementations would not go to the
extra trouble of determining if the cursor is currently on the first, or the last, or row whose
absolute position is what was mentioned in an absolute(), etc....
28) FUNCTION: rowChanged(RowSetEvent event), description:
Notifies registered listeners that a RowSet object has had a change in one of its rows.
Similar question... IF an update operation change a value to itself is a rowChanged event
supposed to occur?
29) RowSetMetaData: setAutoIncrement(int columnIndex, boolean property), as mentioned in an
earlier ResultSetMetaData issue, the fact that a column is auto-increment does not necessarily
make it read-only. The descriptions phrase , and thus read-only should be removed or
qualified... However the earlier issue was addressed.