From 7dec4f80e70122d9900133ee85e03ff876ed44aa Mon Sep 17 00:00:00 2001 From: lancea Date: Thu, 27 Jun 2013 15:07:56 -0400 Subject: [PATCH] 8017471: Fix JDBC -Xdoclint public errors Reviewed-by: darcy --- src/share/classes/java/sql/Blob.java | 4 +- .../classes/java/sql/CallableStatement.java | 2 + src/share/classes/java/sql/Clob.java | 4 +- .../classes/java/sql/DatabaseMetaData.java | 4 +- src/share/classes/java/sql/Driver.java | 5 +- src/share/classes/java/sql/DriverAction.java | 2 +- src/share/classes/java/sql/NClob.java | 4 +- src/share/classes/java/sql/ResultSet.java | 6 +- src/share/classes/java/sql/SQLInput.java | 1 + src/share/classes/java/sql/SQLPermission.java | 1 - src/share/classes/java/sql/SQLXML.java | 4 +- src/share/classes/java/sql/Wrapper.java | 3 +- .../classes/javax/sql/CommonDataSource.java | 5 +- .../javax/sql/ConnectionPoolDataSource.java | 4 +- src/share/classes/javax/sql/DataSource.java | 2 +- src/share/classes/javax/sql/RowSet.java | 4 +- src/share/classes/javax/sql/XADataSource.java | 4 +- .../classes/javax/sql/rowset/BaseRowSet.java | 8 +- .../javax/sql/rowset/CachedRowSet.java | 11 +- .../javax/sql/rowset/FilteredRowSet.java | 8 +- .../classes/javax/sql/rowset/JdbcRowSet.java | 12 +- .../classes/javax/sql/rowset/Joinable.java | 4 +- .../classes/javax/sql/rowset/Predicate.java | 4 +- .../javax/sql/rowset/RowSetProvider.java | 6 +- .../javax/sql/rowset/RowSetWarning.java | 4 +- .../classes/javax/sql/rowset/WebRowSet.java | 570 +++++++++--------- .../classes/javax/sql/rowset/package.html | 4 +- .../javax/sql/rowset/serial/SerialArray.java | 4 +- .../javax/sql/rowset/serial/SerialBlob.java | 4 +- .../javax/sql/rowset/serial/SerialClob.java | 4 +- .../sql/rowset/serial/SerialDatalink.java | 5 +- .../sql/rowset/serial/SerialJavaObject.java | 2 +- .../javax/sql/rowset/serial/SerialRef.java | 4 +- .../javax/sql/rowset/serial/SerialStruct.java | 4 +- .../javax/sql/rowset/spi/SyncFactory.java | 14 +- .../javax/sql/rowset/spi/SyncResolver.java | 15 +- 36 files changed, 386 insertions(+), 360 deletions(-) diff --git a/src/share/classes/java/sql/Blob.java b/src/share/classes/java/sql/Blob.java index 46b7c2f20..90bb251c0 100644 --- a/src/share/classes/java/sql/Blob.java +++ b/src/share/classes/java/sql/Blob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ import java.io.InputStream; /** * The representation (mapping) in - * the JavaTM programming + * the Java™ programming * language of an SQL * BLOB value. An SQL BLOB is a built-in type * that stores a Binary Large Object as a column value in a row of diff --git a/src/share/classes/java/sql/CallableStatement.java b/src/share/classes/java/sql/CallableStatement.java index a39af4052..dc98859bf 100644 --- a/src/share/classes/java/sql/CallableStatement.java +++ b/src/share/classes/java/sql/CallableStatement.java @@ -2445,6 +2445,7 @@ public interface CallableStatement extends PreparedStatement { * @param parameterIndex the first parameter is 1, the second is 2, and so on * @param type Class representing the Java data type to convert the * designated parameter to. + * @param the type of the class modeled by this Class object * @return an instance of {@code type} holding the OUT parameter value * @throws SQLException if conversion is not supported, type is null or * another error occurs. The getCause() method of the @@ -2473,6 +2474,7 @@ public interface CallableStatement extends PreparedStatement { * @param parameterName the name of the parameter * @param type Class representing the Java data type to convert * the designated parameter to. + * @param the type of the class modeled by this Class object * @return an instance of {@code type} holding the OUT parameter * value * @throws SQLException if conversion is not supported, type is null or diff --git a/src/share/classes/java/sql/Clob.java b/src/share/classes/java/sql/Clob.java index 868c862a0..8ffc38af7 100644 --- a/src/share/classes/java/sql/Clob.java +++ b/src/share/classes/java/sql/Clob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ package java.sql; import java.io.Reader; /** - * The mapping in the JavaTM programming language + * The mapping in the Java™ programming language * for the SQL CLOB type. * An SQL CLOB is a built-in type * that stores a Character Large Object as a column value in a row of diff --git a/src/share/classes/java/sql/DatabaseMetaData.java b/src/share/classes/java/sql/DatabaseMetaData.java index 035365512..63c6f131c 100644 --- a/src/share/classes/java/sql/DatabaseMetaData.java +++ b/src/share/classes/java/sql/DatabaseMetaData.java @@ -31,7 +31,7 @@ package java.sql; *

* This interface is implemented by driver vendors to let users know the capabilities * of a Database Management System (DBMS) in combination with - * the driver based on JDBCTM technology + * the driver based on JDBC™ technology * ("JDBC driver") that is used with it. Different relational DBMSs often support * different features, implement features in different ways, and use different * data types. In addition, a driver may implement a feature on top of what the @@ -3074,7 +3074,7 @@ public interface DatabaseMetaData extends Wrapper { * * @param holdability one of the following constants: * ResultSet.HOLD_CURSORS_OVER_COMMIT or - * ResultSet.CLOSE_CURSORS_AT_COMMIT + * ResultSet.CLOSE_CURSORS_AT_COMMIT * @return true if so; false otherwise * @exception SQLException if a database access error occurs * @see Connection diff --git a/src/share/classes/java/sql/Driver.java b/src/share/classes/java/sql/Driver.java index 27ad3e040..3bb3e0c45 100644 --- a/src/share/classes/java/sql/Driver.java +++ b/src/share/classes/java/sql/Driver.java @@ -144,7 +144,7 @@ public interface Driver { /** * Reports whether this driver is a genuine JDBC - * CompliantTM driver. + * Compliant™ driver. * A driver may only report true here if it passes the JDBC * compliance tests; otherwise it is required to return false. *

@@ -173,7 +173,8 @@ public interface Driver { * In the worst case, this may be the root Logger. * * @return the parent Logger for this driver - * @throws SQLFeatureNotSupportedException if the driver does not use java.util.logging. + * @throws SQLFeatureNotSupportedException if the driver does not use + * {@code java.util.logging}. * @since 1.7 */ public Logger getParentLogger() throws SQLFeatureNotSupportedException; diff --git a/src/share/classes/java/sql/DriverAction.java b/src/share/classes/java/sql/DriverAction.java index 167168c9b..59d982596 100644 --- a/src/share/classes/java/sql/DriverAction.java +++ b/src/share/classes/java/sql/DriverAction.java @@ -33,7 +33,7 @@ package java.sql; * directly by applications. A JDBC Driver may choose * to create its {@code DriverAction} implementation in a private class * to avoid it being called directly. - * + *

* The JDBC driver's static initialization block must call * {@linkplain DriverManager#registerDriver(java.sql.Driver, java.sql.DriverAction) } in order * to inform {@code DriverManager} which {@code DriverAction} implementation to diff --git a/src/share/classes/java/sql/NClob.java b/src/share/classes/java/sql/NClob.java index a70ed6190..f3d535c0a 100644 --- a/src/share/classes/java/sql/NClob.java +++ b/src/share/classes/java/sql/NClob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ package java.sql; import java.sql.Clob; /** - * The mapping in the JavaTM programming language + * The mapping in the Java™ programming language * for the SQL NCLOB type. * An SQL NCLOB is a built-in type * that stores a Character Large Object using the National Character Set diff --git a/src/share/classes/java/sql/ResultSet.java b/src/share/classes/java/sql/ResultSet.java index 7029c9359..9c9124163 100644 --- a/src/share/classes/java/sql/ResultSet.java +++ b/src/share/classes/java/sql/ResultSet.java @@ -90,7 +90,7 @@ import java.io.InputStream; * the intended columns, which can be assured with the SQL AS clause. *

* A set of updater methods were added to this interface - * in the JDBC 2.0 API (JavaTM 2 SDK, + * in the JDBC 2.0 API (Java™ 2 SDK, * Standard Edition, version 1.2). The comments regarding parameters * to the getter methods also apply to parameters to the * updater methods. @@ -4101,7 +4101,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * Appendix B, Table B-3 and conversion of appropriate user defined SQL * types to a Java type which implements {@code SQLData}, or {@code Struct}. * Additional conversions may be supported and are vendor defined. - * + * @param the type of the class modeled by this Class object * @param columnIndex the first column is 1, the second is 2, ... * @param type Class representing the Java data type to convert the designated * column to. @@ -4135,6 +4135,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * of the column * @param type Class representing the Java data type to convert the designated * column to. + * @param the type of the class modeled by this Class object * @return an instance of {@code type} holding the column value * @throws SQLException if conversion is not supported, type is null or * another error occurs. The getCause() method of the @@ -4208,6 +4209,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnLabel the label for the column specified with the SQL AS * clause. If the SQL AS clause was not specified, then the label is * the name of the column + * @param x the new column value * @param targetSqlType the SQL type to be sent to the database * @param scaleOrLength for an object of {@code java.math.BigDecimal} , * this is the number of digits after the decimal point. For diff --git a/src/share/classes/java/sql/SQLInput.java b/src/share/classes/java/sql/SQLInput.java index 8d2540dc4..ae65e67ac 100644 --- a/src/share/classes/java/sql/SQLInput.java +++ b/src/share/classes/java/sql/SQLInput.java @@ -444,6 +444,7 @@ public interface SQLInput { *

* The default implementation will throw {@code SQLFeatureNotSupportedException} * + * @param the type of the class modeled by this Class object * @param type Class representing the Java data type to convert the attribute to. * @return the attribute at the head of the stream as an {@code Object} in the * Java programming language;{@code null} if the attribute is SQL {@code NULL} diff --git a/src/share/classes/java/sql/SQLPermission.java b/src/share/classes/java/sql/SQLPermission.java index 3aa5a4286..d264706ab 100644 --- a/src/share/classes/java/sql/SQLPermission.java +++ b/src/share/classes/java/sql/SQLPermission.java @@ -103,7 +103,6 @@ import java.security.*; * Permits an application to remove a JDBC driver from the list of * registered Drivers and release its resources. * - * * *

* @since 1.3 diff --git a/src/share/classes/java/sql/SQLXML.java b/src/share/classes/java/sql/SQLXML.java index 88e3baada..2acc5d1d3 100644 --- a/src/share/classes/java/sql/SQLXML.java +++ b/src/share/classes/java/sql/SQLXML.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -360,6 +360,7 @@ public interface SQLXML * xmlReader.parse(saxSource.getInputSource()); * * + * @param the type of the class modeled by this Class object * @param sourceClass The class of the source, or null. * If the class is null, a vendor specifc Source implementation will be returned. * The following classes are supported at a minimum: @@ -401,6 +402,7 @@ public interface SQLXML * contentHandler.endDocument(); * * + * @param the type of the class modeled by this Class object * @param resultClass The class of the result, or null. * If resultClass is null, a vendor specific Result implementation will be returned. * The following classes are supported at a minimum: diff --git a/src/share/classes/java/sql/Wrapper.java b/src/share/classes/java/sql/Wrapper.java index 2eaa003f2..ee77431c0 100644 --- a/src/share/classes/java/sql/Wrapper.java +++ b/src/share/classes/java/sql/Wrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,6 +53,7 @@ public interface Wrapper { * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. * + * @param the type of the class modeled by this Class object * @param iface A Class defining an interface that the result must implement. * @return an object that implements the interface. May be a proxy for the actual implementing object. * @throws java.sql.SQLException If no object found that implements the interface diff --git a/src/share/classes/javax/sql/CommonDataSource.java b/src/share/classes/javax/sql/CommonDataSource.java index 25b40686d..51f5ea03e 100644 --- a/src/share/classes/javax/sql/CommonDataSource.java +++ b/src/share/classes/javax/sql/CommonDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,7 +122,8 @@ public interface CommonDataSource { * In the worst case, this may be the root Logger. * * @return the parent Logger for this data source - * @throws SQLFeatureNotSupportedException if the data source does not use java.util.logging. + * @throws SQLFeatureNotSupportedException if the data source does not use + * {@code java.util.logging} * @since 1.7 */ public Logger getParentLogger() throws SQLFeatureNotSupportedException; diff --git a/src/share/classes/javax/sql/ConnectionPoolDataSource.java b/src/share/classes/javax/sql/ConnectionPoolDataSource.java index 8bb34ed27..6388735ad 100644 --- a/src/share/classes/javax/sql/ConnectionPoolDataSource.java +++ b/src/share/classes/javax/sql/ConnectionPoolDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ import java.sql.SQLException; * A factory for PooledConnection * objects. An object that implements this interface will typically be * registered with a naming service that is based on the - * JavaTM Naming and Directory Interface + * Java™ Naming and Directory Interface * (JNDI). * * @since 1.4 diff --git a/src/share/classes/javax/sql/DataSource.java b/src/share/classes/javax/sql/DataSource.java index 8235d2a27..71fa074e2 100644 --- a/src/share/classes/javax/sql/DataSource.java +++ b/src/share/classes/javax/sql/DataSource.java @@ -36,7 +36,7 @@ import java.sql.Wrapper; * is the preferred means of getting a connection. An object that implements * the {@code DataSource} interface will typically be * registered with a naming service based on the - * JavaTM Naming and Directory (JNDI) API. + * Java™ Naming and Directory (JNDI) API. *

* The {@code DataSource} interface is implemented by a driver vendor. * There are three types of implementations: diff --git a/src/share/classes/javax/sql/RowSet.java b/src/share/classes/javax/sql/RowSet.java index fd3352966..38cd35a3c 100644 --- a/src/share/classes/javax/sql/RowSet.java +++ b/src/share/classes/javax/sql/RowSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ import java.util.*; /** * The interface that adds support to the JDBC API for the - * JavaBeansTM component model. + * JavaBeans™ component model. * A rowset, which can be used as a JavaBeans component in * a visual Bean development environment, can be created and * configured at design time and executed at run time. diff --git a/src/share/classes/javax/sql/XADataSource.java b/src/share/classes/javax/sql/XADataSource.java index 325f015f7..b768601c7 100644 --- a/src/share/classes/javax/sql/XADataSource.java +++ b/src/share/classes/javax/sql/XADataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.sql.*; * A factory for {@code XAConnection} objects that is used internally. * An object that implements the {@code XADataSource} interface is * typically registered with a naming service that uses the - * Java Naming and Directory InterfaceTM + * Java Naming and Directory Interface™ * (JNDI). *

* An implementation of {@code XADataSource} must include a public no-arg diff --git a/src/share/classes/javax/sql/rowset/BaseRowSet.java b/src/share/classes/javax/sql/rowset/BaseRowSet.java index a3b13fa0f..1ca60adbf 100644 --- a/src/share/classes/javax/sql/rowset/BaseRowSet.java +++ b/src/share/classes/javax/sql/rowset/BaseRowSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import javax.sql.rowset.serial.*; /** * An abstract class providing a RowSet object with its basic functionality. * The basic functions include having properties and sending event notifications, - * which all JavaBeansTM components must implement. + * which all JavaBeans™ components must implement. *

*

1.0 Overview

* The BaseRowSet class provides the core functionality @@ -93,7 +93,7 @@ import javax.sql.rowset.serial.*; * NOTE: In order to use a DataSource object for making a * connection, the DataSource object must have been registered * with a naming service that uses the Java Naming and Directory - * InterfaceTM (JNDI) API. This registration + * Interface™ (JNDI) API. This registration * is usually done by a person acting in the capacity of a system administrator. *

*

3.0 Setting the Command and Its Parameters

@@ -106,7 +106,7 @@ import javax.sql.rowset.serial.*; * to null if required. *

* The following code fragment illustrates how the - * CachedRowSetTM + * CachedRowSet™ * object crs might have its command property set. Note that if a * tool is used to set properties, this is the code that the tool would use. *

{@code
diff --git a/src/share/classes/javax/sql/rowset/CachedRowSet.java b/src/share/classes/javax/sql/rowset/CachedRowSet.java
index 1a8517520..26862715e 100644
--- a/src/share/classes/javax/sql/rowset/CachedRowSet.java
+++ b/src/share/classes/javax/sql/rowset/CachedRowSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@ import javax.sql.rowset.spi.*;
  * A CachedRowSet object is a container for rows of data
  * that caches its rows in memory, which makes it possible to operate without always being
  * connected to its data source. Further, it is a
- * JavaBeansTM component and is scrollable,
+ * JavaBeans™ component and is scrollable,
  * updatable, and serializable. A CachedRowSet object typically
  * contains rows from a result set, but it can also contain rows from any file
  * with a tabular format, such as a spread sheet.  The reference implementation
@@ -410,7 +410,7 @@ import javax.sql.rowset.spi.*;
  * NOTE:  In order to use a DataSource object for making a
  * connection, the DataSource object must have been registered
  * with a naming service that uses the Java Naming and Directory
- * InterfaceTM (JNDI) API.  This registration
+ * Interface™ (JNDI) API.  This registration
  * is usually done by a person acting in the capacity of a system
  * administrator.
  * 

@@ -734,7 +734,6 @@ public interface CachedRowSet extends RowSet, Joinable { * source. Otherwise, the application must explicity call the * commit() or rollback() methods as appropriate. * - * @throws SQLException if the cursor is on the insert row * @throws SyncProviderException if the underlying * synchronization provider's writer fails to write the updates * back to the data source @@ -805,7 +804,6 @@ public interface CachedRowSet extends RowSet, Joinable { * commit or rollback methods as appropriate. * * @param con a standard JDBC Connection object - * @throws SQLException if the cursor is on the insert row * @throws SyncProviderException if the underlying * synchronization provider's writer fails to write the updates * back to the data source @@ -1371,7 +1369,7 @@ public interface CachedRowSet extends RowSet, Joinable { * Applications can form a WebRowSet object from the CachedRowSet * object returned by this method in order * to export the RowSet schema definition to XML for future use. - * + * @return An empty copy of this {@code CachedRowSet} object * @throws SQLException if an error occurs in cloning the structure of this * CachedRowSet object * @see #createShared @@ -1543,6 +1541,7 @@ public interface CachedRowSet extends RowSet, Joinable { * @param numRows when populating, the number of rows interval on which the * CachedRowSet populated should fire; the default value * is zero; cannot be less than fetchSize or zero + * @throws SQLException {@code numRows < 0 or numRows < getFetchSize() } */ public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException; diff --git a/src/share/classes/javax/sql/rowset/FilteredRowSet.java b/src/share/classes/javax/sql/rowset/FilteredRowSet.java index 15bfa42a8..754bc4915 100644 --- a/src/share/classes/javax/sql/rowset/FilteredRowSet.java +++ b/src/share/classes/javax/sql/rowset/FilteredRowSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ import java.math.*; *

* A JDBC FilteredRowSet standard implementation implements the * RowSet interfaces and extends the - * CachedRowSetTM class. The + * CachedRowSet™ class. The * CachedRowSet class provides a set of protected cursor manipulation * methods, which a FilteredRowSet implementation can override * to supply filtering support. @@ -69,8 +69,8 @@ import java.math.*; * class JavaDoc), a FilteredRowSet could then be used as described * below. *

- * *

+ * {@code
  *     FilteredRowSet frs = new FilteredRowSetImpl();
  *     frs.populate(rs);
  *
@@ -78,8 +78,8 @@ import java.math.*;
  *     frs.setFilter(name);
  *
  *     frs.next() // only names from "Alpha" to "Bravo" will be returned
+ * }
  * 
- * * In the example above, we initialize a Range object which * implements the Predicate interface. This object expresses * the following constraints: All rows outputted or modified from this diff --git a/src/share/classes/javax/sql/rowset/JdbcRowSet.java b/src/share/classes/javax/sql/rowset/JdbcRowSet.java index 448f4cd8c..bcb05d104 100644 --- a/src/share/classes/javax/sql/rowset/JdbcRowSet.java +++ b/src/share/classes/javax/sql/rowset/JdbcRowSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ import java.io.*; * *

1.0 Overview

* A wrapper around a ResultSet object that makes it possible - * to use the result set as a JavaBeansTM + * to use the result set as a JavaBeans™ * component. Thus, a JdbcRowSet object can be one of the Beans that * a tool makes available for composing an application. Because * a JdbcRowSet is a connected rowset, that is, it continually @@ -113,7 +113,7 @@ import java.io.*; *

* The implementation of the RowSet method execute in the * JdbcRowSet reference implementation differs from that in the - * CachedRowSetTM + * CachedRowSet™ * reference implementation to account for the different * requirements of connected and disconnected RowSet objects. *

@@ -238,6 +238,7 @@ public interface JdbcRowSet extends RowSet, Joinable { * call to either the method commit or the method rollback. By default, * new connections are in auto-commit mode. * + * @return {@code true} if auto-commit is enabled; {@code false} otherwise * @throws SQLException if a database access error occurs * @see java.sql.Connection#getAutoCommit() */ @@ -251,7 +252,8 @@ public interface JdbcRowSet extends RowSet, Joinable { * to allow an application to set the JdbcRowSet transaction behavior. *

* Sets the current auto-commit mode for this Connection object. - * + * @param autoCommit {@code true} to enable auto-commit; {@code false} to + * disable auto-commit * @throws SQLException if a database access error occurs * @see java.sql.Connection#setAutoCommit(boolean) */ @@ -277,7 +279,7 @@ public interface JdbcRowSet extends RowSet, Joinable { * Undoes all changes made in the current transaction to the last set savepoint * and releases any database locks currently held by this Connection * object. This method should be used only when auto-commit mode has been disabled. - * + * @param s The {@code Savepoint} to rollback to * @throws SQLException if a database access error occurs or this Connection * object within this JdbcRowSet is in auto-commit mode. * @see #rollback diff --git a/src/share/classes/javax/sql/rowset/Joinable.java b/src/share/classes/javax/sql/rowset/Joinable.java index 7a789474b..c15f44de5 100644 --- a/src/share/classes/javax/sql/rowset/Joinable.java +++ b/src/share/classes/javax/sql/rowset/Joinable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,7 +137,7 @@ public interface Joinable { * object. A JoinRowSet object can now add this RowSet * object based on the match column. *

- * Sub-interfaces such as the CachedRowSetTM + * Sub-interfaces such as the CachedRowSet™ * interface define the method CachedRowSet.setKeyColumns, which allows * primary key semantics to be enforced on specific columns. * Implementations of the setMatchColumn(int columnIdx) method diff --git a/src/share/classes/javax/sql/rowset/Predicate.java b/src/share/classes/javax/sql/rowset/Predicate.java index eb747602e..63d76fdca 100644 --- a/src/share/classes/javax/sql/rowset/Predicate.java +++ b/src/share/classes/javax/sql/rowset/Predicate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -111,7 +111,7 @@ public interface Predicate { * cursor moving from row to the next. In addition, if this internal method * moves the cursor onto a row that has been deleted, the internal method will * continue to ove the cursor until a valid row is found. - * + * @param rs The {@code RowSet} to be evaluated * @return true if there are more rows in the filter; * false otherwise */ diff --git a/src/share/classes/javax/sql/rowset/RowSetProvider.java b/src/share/classes/javax/sql/rowset/RowSetProvider.java index 1dd2d8315..654bb88ea 100644 --- a/src/share/classes/javax/sql/rowset/RowSetProvider.java +++ b/src/share/classes/javax/sql/rowset/RowSetProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,9 @@ public class RowSetProvider { debug = val != null && !"false".equals(val); } - + /** + * RowSetProvider constructor + */ protected RowSetProvider () { } diff --git a/src/share/classes/javax/sql/rowset/RowSetWarning.java b/src/share/classes/javax/sql/rowset/RowSetWarning.java index 57b9e4383..c110834c2 100644 --- a/src/share/classes/javax/sql/rowset/RowSetWarning.java +++ b/src/share/classes/javax/sql/rowset/RowSetWarning.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,7 +35,7 @@ import java.sql.SQLException; * This class complements the SQLWarning class. *

* Rowset warnings may be retrieved from JdbcRowSet, - * CachedRowSetTM, + * CachedRowSet™, * WebRowSet, FilteredRowSet, or JoinRowSet * implementations. To retrieve the first warning reported on any * RowSet diff --git a/src/share/classes/javax/sql/rowset/WebRowSet.java b/src/share/classes/javax/sql/rowset/WebRowSet.java index abef62f12..3f0ba94b7 100644 --- a/src/share/classes/javax/sql/rowset/WebRowSet.java +++ b/src/share/classes/javax/sql/rowset/WebRowSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,306 +33,310 @@ import java.math.*; import org.xml.sax.*; /** - * The standard interface that all implementations of a WebRowSet + * The standard interface that all implementations of a {@code WebRowSet} * must implement. *

*

1.0 Overview

- * The WebRowSetImpl provides the standard + * The {@code WebRowSetImpl} provides the standard * reference implementation, which may be extended if required. *

* The standard WebRowSet XML Schema definition is available at the following * URI: *

* It describes the standard XML document format required when describing a - * RowSet object in XML and must be used be all standard implementations - * of the WebRowSet interface to ensure interoperability. In addition, - * the WebRowSet schema uses specific SQL/XML Schema annotations, + * {@code RowSet} object in XML and must be used be all standard implementations + * of the {@code WebRowSet} interface to ensure interoperability. In addition, + * the {@code WebRowSet} schema uses specific SQL/XML Schema annotations, * thus ensuring greater cross * platform inter-operability. This is an effort currently under way at the ISO * organization. The SQL/XML definition is available at the following URI: * - * The schema definition describes the internal data of a RowSet object + * The schema definition describes the internal data of a {@code RowSet} object * in three distinct areas: *
    - *
  • properties
  • - * These properties describe the standard synchronization provider properties in - * addition to the more general RowSet properties. - *

    - *

  • metadata
  • - * This describes the metadata associated with the tabular structure governed by a - * WebRowSet object. The metadata described is closely aligned with the - * metadata accessible in the underlying java.sql.ResultSet interface. - *

    - *

  • data
  • - * This describes the original data (the state of data since the last population - * or last synchronization of the WebRowSet object) and the current + *
  • properties - These properties describe the standard synchronization + * provider properties in addition to the more general {@code RowSet} properties. + *
  • + *
  • metadata - This describes the metadata associated with the tabular structure governed by a + * {@code WebRowSet} object. The metadata described is closely aligned with the + * metadata accessible in the underlying {@code java.sql.ResultSet} interface. + *
  • + *
  • data - This describes the original data (the state of data since the + * last population + * or last synchronization of the {@code WebRowSet} object) and the current * data. By keeping track of the delta between the original data and the current data, - * a WebRowSet maintains - * the ability to synchronize changes in its data back to the originating data source. + * a {@code WebRowSet} maintains the ability to synchronize changes + * in its data back to the originating data source. + *
  • *
*

*

2.0 WebRowSet States

- * The following sections demonstrates how a WebRowSet implementation + * The following sections demonstrates how a {@code WebRowSet} implementation * should use the XML Schema to describe update, insert, and delete operations - * and to describe the state of a WebRowSet object in XML. + * and to describe the state of a {@code WebRowSet} object in XML. *

- *

2.1 State 1 - Outputting a WebRowSet Object to XML

- * In this example, a WebRowSet object is created and populated with a simple 2 column, - * 5 row table from a data source. Having the 5 rows in a WebRowSet object + *

2.1 State 1 - Outputting a {@code WebRowSet} Object to XML

+ * In this example, a {@code WebRowSet} object is created and populated with a simple 2 column, + * 5 row table from a data source. Having the 5 rows in a {@code WebRowSet} object * makes it possible to describe them in XML. The * metadata describing the various standard JavaBeans properties as defined * in the RowSet interface plus the standard properties defined in - * the CachedRowSetTM interface + * the {@code CachedRowSet}™ interface * provide key details that describe WebRowSet * properties. Outputting the WebRowSet object to XML using the standard - * writeXml methods describes the internal properties as follows: + * {@code writeXml} methods describes the internal properties as follows: *
- * <properties>
- *       <command>select co1, col2 from test_table</command>
- *      <concurrency>1</concurrency>
- *      <datasource/>
- *      <escape-processing>true</escape-processing>
- *      <fetch-direction>0</fetch-direction>
- *      <fetch-size>0</fetch-size>
- *      <isolation-level>1</isolation-level>
- *      <key-columns/>
- *      <map/>
- *      <max-field-size>0</max-field-size>
- *      <max-rows>0</max-rows>
- *      <query-timeout>0</query-timeout>
- *      <read-only>false</read-only>
- *      <rowset-type>TRANSACTION_READ_UNCOMMITED</rowset-type>
- *      <show-deleted>false</show-deleted>
- *      <table-name/>
- *      <url>jdbc:thin:oracle</url>
- *      <sync-provider>
- *              <sync-provider-name>.com.rowset.provider.RIOptimisticProvider</sync-provider-name>
- *              <sync-provider-vendor>Oracle Corporation</sync-provider-vendor>
- *              <sync-provider-version>1.0</sync-provider-name>
- *              <sync-provider-grade>LOW</sync-provider-grade>
- *              <data-source-lock>NONE</data-source-lock>
- *      </sync-provider>
- * </properties>
- * 
+ * {@code + * + * select co1, col2 from test_table + * 1 + * + * true + * 0 + * 0 + * 1 + * + * + * 0 + * 0 + * 0 + * false + * TRANSACTION_READ_UNCOMMITED + * false + * + * jdbc:thin:oracle + * + * .com.rowset.provider.RIOptimisticProvider + * Oracle Corporation + * 1.0 + * LOW + * NONE + * + * + * }
* The meta-data describing the make up of the WebRowSet is described * in XML as detailed below. Note both columns are described between the - * column-definition tags. + * {@code column-definition} tags. *
- * <metadata>
- *      <column-count>2</column-count>
- *      <column-definition>
- *              <column-index>1</column-index>
- *              <auto-increment>false</auto-increment>
- *              <case-sensitive>true</case-sensitive>
- *              <currency>false</currency>
- *              <nullable>1</nullable>
- *              <signed>false</signed>
- *              <searchable>true</searchable>
- *              <column-display-size>10</column-display-size>
- *              <column-label>COL1</column-label>
- *              <column-name>COL1</column-name>
- *              <schema-name/>
- *              <column-precision>10</column-precision>
- *              <column-scale>0</column-scale>
- *              <table-name/>
- *              <catalog-name/>
- *              <column-type>1</column-type>
- *              <column-type-name>CHAR</column-type-name>
- *      </column-definition>
- *      <column-definition>
- *              <column-index>2</column-index>
- *              <auto-increment>false</auto-increment>
- *              <case-sensitive>false</case-sensitive>
- *              <currency>false</currency>
- *              <nullable>1</nullable>
- *              <signed>true</signed>
- *              <searchable>true</searchable>
- *              <column-display-size>39</column-display-size>
- *              <column-label>COL2</column-label>
- *              <column-name>COL2</column-name>
- *              <schema-name/>
- *              <column-precision>38</column-precision>
- *              <column-scale>0</column-scale>
- *              <table-name/>
- *              <catalog-name/>
- *              <column-type>3</column-type>
- *              <column-type-name>NUMBER</column-type-name>
- *      </column-definition>
- * </metadata>
- * 
+ * {@code + * + * 2 + * + * 1 + * false + * true + * false + * 1 + * false + * true + * 10 + * COL1 + * COL1 + * + * 10 + * 0 + * + * + * 1 + * CHAR + * + * + * 2 + * false + * false + * false + * 1 + * true + * true + * 39 + * COL2 + * COL2 + * + * 38 + * 0 + * + * + * 3 + * NUMBER + * + * + * } * Having detailed how the properties and metadata are described, the following details - * how the contents of a WebRowSet object is described in XML. Note, that - * this describes a WebRowSet object that has not undergone any + * how the contents of a {@code WebRowSet} object is described in XML. Note, that + * this describes a {@code WebRowSet} object that has not undergone any * modifications since its instantiation. - * A currentRow tag is mapped to each row of the table structure that the - * WebRowSet object provides. A columnValue tag may contain - * either the stringData or binaryData tag, according to + * A {@code currentRow} tag is mapped to each row of the table structure that the + * {@code WebRowSet} object provides. A {@code columnValue} tag may contain + * either the {@code stringData} or {@code binaryData} tag, according to * the SQL type that - * the XML value is mapping back to. The binaryData tag contains data in the - * Base64 encoding and is typically used for BLOB and CLOB type data. + * the XML value is mapping back to. The {@code binaryData} tag contains data in the + * Base64 encoding and is typically used for {@code BLOB} and {@code CLOB} type data. *
- * <data>
- *      <currentRow>
- *              <columnValue>
+ * {@code
+ * 
+ *      
+ *              
  *                      firstrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      1
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      secondrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      2
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      thirdrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      3
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      fourthrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      4
- *              </columnValue>
- *      </currentRow>
- * </data>
- * 
+ * + * + * + * } *

2.2 State 2 - Deleting a Row

- * Deleting a row in a WebRowSet object involves simply moving to the row - * to be deleted and then calling the method deleteRow, as in any other - * RowSet object. The following - * two lines of code, in which wrs is a WebRowSet object, delete + * Deleting a row in a {@code WebRowSet} object involves simply moving to the row + * to be deleted and then calling the method {@code deleteRow}, as in any other + * {@code RowSet} object. The following + * two lines of code, in which wrs is a {@code WebRowSet} object, delete * the third row. *
  *     wrs.absolute(3);
  *     wrs.deleteRow();
  * 
- * The XML description shows the third row is marked as a deleteRow, - * which eliminates the third row in the WebRowSet object. + * The XML description shows the third row is marked as a {@code deleteRow}, + * which eliminates the third row in the {@code WebRowSet} object. *
- * <data>
- *      <currentRow>
- *              <columnValue>
+ * {@code
+ * 
+ *      
+ *              
  *                      firstrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      1
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      secondrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      2
- *              </columnValue>
- *      </currentRow>
- *      <deleteRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      thirdrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      3
- *              </columnValue>
- *      </deleteRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      fourthrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      4
- *              </columnValue>
- *      </currentRow>
- * </data>
- * 
+ * + * + * + *} *

2.3 State 3 - Inserting a Row

- * A WebRowSet object can insert a new row by moving to the insert row, + * A {@code WebRowSet} object can insert a new row by moving to the insert row, * calling the appropriate updater methods for each column in the row, and then - * calling the method insertRow. + * calling the method {@code insertRow}. *
+ * {@code
  * wrs.moveToInsertRow();
  * wrs.updateString(1, "fifththrow");
  * wrs.updateString(2, "5");
  * wrs.insertRow();
- * 
+ * } * The following code fragment changes the second column value in the row just inserted. * Note that this code applies when new rows are inserted right after the current row, - * which is why the method next moves the cursor to the correct row. - * Calling the method acceptChanges writes the change to the data source. + * which is why the method {@code next} moves the cursor to the correct row. + * Calling the method {@code acceptChanges} writes the change to the data source. * *
- * wrs.moveToCurrentRow();
+ * {@code wrs.moveToCurrentRow();
  * wrs.next();
  * wrs.updateString(2, "V");
  * wrs.acceptChanges();
- * :
- * 
+ * } * Describing this in XML demonstrates where the Java code inserts a new row and then * performs an update on the newly inserted row on an individual field. *
- * <data>
- *      <currentRow>
- *              <columnValue>
+ * {@code
+ * 
+ *      
+ *              
  *                      firstrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      1
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      secondrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      2
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      newthirdrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      III
- *              </columnValue>
- *      </currentRow>
- *      <insertRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      fifthrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      5
- *              </columnValue>
- *              <updateValue>
+ *              
+ *              
  *                      V
- *              </updateValue>
- *      </insertRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      fourthrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      4
- *              </columnValue>
- *      </currentRow>
- * </date>
- * 
+ * + * + * + *} *

2.4 State 4 - Modifying a Row

* Modifying a row produces specific XML that records both the new value and the * value that was replaced. The value that was replaced becomes the original value, @@ -340,63 +344,65 @@ import org.xml.sax.*; * code moves the cursor to a specific row, performs some modifications, and updates * the row when complete. *
+ *{@code
  * wrs.absolute(5);
  * wrs.updateString(1, "new4thRow");
  * wrs.updateString(2, "IV");
  * wrs.updateRow();
- * 
- * In XML, this is described by the modifyRow tag. Both the original and new + * } + * In XML, this is described by the {@code modifyRow} tag. Both the original and new * values are contained within the tag for original row tracking purposes. *
- * <data>
- *      <currentRow>
- *              <columnValue>
+ * {@code
+ * 
+ *      
+ *              
  *                      firstrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      1
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      secondrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      2
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      newthirdrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      III
- *              </columnValue>
- *      </currentRow>
- *      <currentRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      fifthrow
- *              </columnValue>
- *              <columnValue>
+ *              
+ *              
  *                      5
- *              </columnValue>
- *      </currentRow>
- *      <modifyRow>
- *              <columnValue>
+ *              
+ *      
+ *      
+ *              
  *                      fourthrow
- *              </columnValue>
- *              <updateValue>
+ *              
+ *              
  *                      new4thRow
- *              </updateValue>
- *              <columnValue>
+ *              
+ *              
  *                      4
- *              </columnValue>
- *              <updateValue>
+ *              
+ *              
  *                      IV
- *              </updateValue>
- *      </modifyRow>
- * </data>
- * 
+ * + * + * + * } * * @see javax.sql.rowset.JdbcRowSet * @see javax.sql.rowset.CachedRowSet @@ -407,78 +413,78 @@ import org.xml.sax.*; public interface WebRowSet extends CachedRowSet { /** - * Reads a WebRowSet object in its XML format from the given - * Reader object. + * Reads a {@code WebRowSet} object in its XML format from the given + * {@code Reader} object. * - * @param reader the java.io.Reader stream from which this - * WebRowSet object will be populated + * @param reader the {@code java.io.Reader} stream from which this + * {@code WebRowSet} object will be populated * @throws SQLException if a database access error occurs */ public void readXml(java.io.Reader reader) throws SQLException; /** - * Reads a stream based XML input to populate this WebRowSet + * Reads a stream based XML input to populate this {@code WebRowSet} * object. * - * @param iStream the java.io.InputStream from which this - * WebRowSet object will be populated + * @param iStream the {@code java.io.InputStream} from which this + * {@code WebRowSet} object will be populated * @throws SQLException if a data source access error occurs * @throws IOException if an IO exception occurs */ public void readXml(java.io.InputStream iStream) throws SQLException, IOException; /** - * Populates this WebRowSet object with - * the contents of the given ResultSet object and writes its + * Populates this {@code WebRowSet} object with + * the contents of the given {@code ResultSet} object and writes its * data, properties, and metadata - * to the given Writer object in XML format. + * to the given {@code Writer} object in XML format. *

- * NOTE: The WebRowSet cursor may be moved to write out the + * NOTE: The {@code WebRowSet} cursor may be moved to write out the * contents to the XML data source. If implemented in this way, the cursor must - * be returned to its position just prior to the writeXml() call. + * be returned to its position just prior to the {@code writeXml()} call. * - * @param rs the ResultSet object with which to populate this - * WebRowSet object - * @param writer the java.io.Writer object to write to. + * @param rs the {@code ResultSet} object with which to populate this + * {@code WebRowSet} object + * @param writer the {@code java.io.Writer} object to write to. * @throws SQLException if an error occurs writing out the rowset * contents in XML format */ public void writeXml(ResultSet rs, java.io.Writer writer) throws SQLException; /** - * Populates this WebRowSet object with - * the contents of the given ResultSet object and writes its + * Populates this {@code WebRowSet} object with + * the contents of the given {@code ResultSet} object and writes its * data, properties, and metadata - * to the given OutputStream object in XML format. + * to the given {@code OutputStream} object in XML format. *

- * NOTE: The WebRowSet cursor may be moved to write out the + * NOTE: The {@code WebRowSet} cursor may be moved to write out the * contents to the XML data source. If implemented in this way, the cursor must - * be returned to its position just prior to the writeXml() call. + * be returned to its position just prior to the {@code writeXml()} call. * - * @param rs the ResultSet object with which to populate this - * WebRowSet object - * @param oStream the java.io.OutputStream to write to + * @param rs the {@code ResultSet} object with which to populate this + * {@code WebRowSet} object + * @param oStream the {@code java.io.OutputStream} to write to * @throws SQLException if a data source access error occurs * @throws IOException if a IO exception occurs */ public void writeXml(ResultSet rs, java.io.OutputStream oStream) throws SQLException, IOException; /** - * Writes the data, properties, and metadata for this WebRowSet object - * to the given Writer object in XML format. + * Writes the data, properties, and metadata for this {@code WebRowSet} object + * to the given {@code Writer} object in XML format. * - * @param writer the java.io.Writer stream to write to + * @param writer the {@code java.io.Writer} stream to write to * @throws SQLException if an error occurs writing out the rowset * contents to XML */ public void writeXml(java.io.Writer writer) throws SQLException; /** - * Writes the data, properties, and metadata for this WebRowSet object - * to the given OutputStream object in XML format. + * Writes the data, properties, and metadata for this {@code WebRowSet} object + * to the given {@code OutputStream} object in XML format. * - * @param oStream the java.io.OutputStream stream to write to + * @param oStream the {@code java.io.OutputStream} stream to write to * @throws SQLException if a data source access error occurs * @throws IOException if a IO exception occurs */ @@ -486,14 +492,14 @@ public interface WebRowSet extends CachedRowSet { /** * The public identifier for the XML Schema definition that defines the XML - * tags and their valid values for a WebRowSet implementation. + * tags and their valid values for a {@code WebRowSet} implementation. */ public static String PUBLIC_XML_SCHEMA = "--//Oracle Corporation//XSD Schema//EN"; /** * The URL for the XML Schema definition file that defines the XML tags and - * their valid values for a WebRowSet implementation. + * their valid values for a {@code WebRowSet} implementation. */ public static String SCHEMA_SYSTEM_ID = "http://java.sun.com/xml/ns/jdbc/webrowset.xsd"; } diff --git a/src/share/classes/javax/sql/rowset/package.html b/src/share/classes/javax/sql/rowset/package.html index 61073131e..e8b494ee7 100644 --- a/src/share/classes/javax/sql/rowset/package.html +++ b/src/share/classes/javax/sql/rowset/package.html @@ -67,7 +67,7 @@ interfaces.

  • JdbcRowSet - A wrapper around a ResultSet object that makes it possible to use the result set as a -JavaBeansTM component. Thus, +JavaBeans™ component. Thus, a JdbcRowSet object can be a Bean that any tool makes available for assembling an application as part of a component based architecture . A JdbcRowSet object is a connected RowSet @@ -79,7 +79,7 @@ data structure as defined in the JDBC 3.0 specification.

  • CachedRowSet - - A CachedRowSet object is a JavaBeansTM + - A CachedRowSet object is a JavaBeans™ component that is scrollable, updatable, serializable, and generally disconnected from the source of its data. A CachedRowSet object typically contains rows from a result set, but it can also contain rows from any diff --git a/src/share/classes/javax/sql/rowset/serial/SerialArray.java b/src/share/classes/javax/sql/rowset/serial/SerialArray.java index 3d3926cb8..1e0e440bc 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialArray.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,7 +50,7 @@ import java.util.Arrays; * if necessary. At this time, logical pointers to the data in the data source, * such as locators, are not currently supported. * - *

    Thread safety

    + *

    Thread safety

    * * A SerialArray is not safe for use by multiple concurrent threads. If a * SerialArray is to be used by more than one thread then access to the diff --git a/src/share/classes/javax/sql/rowset/serial/SerialBlob.java b/src/share/classes/javax/sql/rowset/serial/SerialBlob.java index e7bdbcf87..4c5a6b867 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialBlob.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialBlob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ import java.util.Arrays; * Blob object within a SerialBlob object * and to update or truncate a Blob object. * - *

    Thread safety

    + *

    Thread safety

    * *

    A SerialBlob is not safe for use by multiple concurrent threads. If a * SerialBlob is to be used by more than one thread then access to the SerialBlob diff --git a/src/share/classes/javax/sql/rowset/serial/SerialClob.java b/src/share/classes/javax/sql/rowset/serial/SerialClob.java index 5ea5fee14..a2177b2c1 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialClob.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialClob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ import java.util.Arrays; * from a SerialClob object or to locate the start of * a pattern of characters. * - *

    Thread safety

    + *

    Thread safety

    * *

    A SerialClob is not safe for use by multiple concurrent threads. If a * SerialClob is to be used by more than one thread then access to the SerialClob diff --git a/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java b/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java index 4cfcfb115..ad053bcde 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ import java.net.URL; * java.net.URL url = rowset.getURL(1); * * - *

    Thread safety

    + *

    Thread safety

    * * A SerialDatalink is not safe for use by multiple concurrent threads. If a * SerialDatalink is to be used by more than one thread then access to the @@ -77,6 +77,7 @@ public class SerialDatalink implements Serializable, Cloneable { * Constructs a new SerialDatalink object from the given * java.net.URL object. *

    + * @param url the {@code URL} to create the {@code SerialDataLink} from * @throws SerialException if url parameter is a null */ public SerialDatalink(URL url) throws SerialException { diff --git a/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java b/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java index 985ef4005..4a9ce17b4 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java @@ -47,7 +47,7 @@ import sun.reflect.misc.ReflectUtil; * Static or transient fields cannot be serialized; an attempt to serialize * them will result in a SerialException object being thrown. * - *

    Thread safety

    + *

    Thread safety

    * * A SerialJavaObject is not safe for use by multiple concurrent threads. If a * SerialJavaObject is to be used by more than one thread then access to the diff --git a/src/share/classes/javax/sql/rowset/serial/SerialRef.java b/src/share/classes/javax/sql/rowset/serial/SerialRef.java index 84009fac6..834fafe32 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialRef.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import java.util.*; * creating a SerialRef instance from a Ref * object and provides methods for getting and setting the Ref object. * - *

    Thread safety

    + *

    Thread safety

    * * A SerialRef is not safe for use by multiple concurrent threads. If a * SerialRef is to be used by more than one thread then access to the SerialRef diff --git a/src/share/classes/javax/sql/rowset/serial/SerialStruct.java b/src/share/classes/javax/sql/rowset/serial/SerialStruct.java index 2fe11996e..6eef84f3e 100644 --- a/src/share/classes/javax/sql/rowset/serial/SerialStruct.java +++ b/src/share/classes/javax/sql/rowset/serial/SerialStruct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ import javax.sql.rowset.*; * the SQL type name of the SQL structured type in the database, and methods * for retrieving its attribute values. * - *

    Thread safety

    + *

    Thread safety

    * * A SerialStruct is not safe for use by multiple concurrent threads. If a * SerialStruct is to be used by more than one thread then access to the diff --git a/src/share/classes/javax/sql/rowset/spi/SyncFactory.java b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java index e9b10bdcb..6797dc0d3 100644 --- a/src/share/classes/javax/sql/rowset/spi/SyncFactory.java +++ b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -260,13 +260,14 @@ public class SyncFactory { *

    * Synchronization providers bound to a JNDI context can be * registered by binding a SyncProvider instance to a JNDI namespace. - *

      + * *
      +     * {@code
            * SyncProvider p = new MySyncProvider();
            * InitialContext ic = new InitialContext();
            * ic.bind ("jdbc/rowset/MySyncProvider", p);
      -     * 
      - *
    + * } + * * Furthermore, an initial JNDI context should be set with the * SyncFactory using the setJNDIContext method. * The SyncFactory leverages this context to search for @@ -564,6 +565,8 @@ public class SyncFactory { * * @return Enumeration A enumeration of available synchronization * providers that are registered with this Factory + * @throws SyncFactoryException If an error occurs obtaining the registered + * providers */ public static Enumeration getRegisteredProviders() throws SyncFactoryException { @@ -648,7 +651,8 @@ public class SyncFactory { /** * Returns the logging object for applications to retrieve * synchronization events posted by SyncProvider implementations. - * + * @return The {@code Logger} that has been specified for use by + * {@code SyncProvider} implementations * @throws SyncFactoryException if no logging object has been set. */ public static Logger getLogger() throws SyncFactoryException { diff --git a/src/share/classes/javax/sql/rowset/spi/SyncResolver.java b/src/share/classes/javax/sql/rowset/spi/SyncResolver.java index c1180cf92..71f463fef 100644 --- a/src/share/classes/javax/sql/rowset/spi/SyncResolver.java +++ b/src/share/classes/javax/sql/rowset/spi/SyncResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,10 +81,13 @@ import java.sql.SQLException; * SyncProviderException method getSyncResolver to get * the SyncResolver object resolver. *
    + * {@code
      *     } catch (SyncProviderException spe) {
      *         SyncResolver resolver = spe.getSyncResolver();
      *     ...
      *     }
    + *
    + * }
      * 
    *

    * With resolver in hand, an application can use it to get the information @@ -97,7 +100,7 @@ import java.sql.SQLException; * The following kinds of information can be obtained from a SyncResolver * object: *

    - *

  • What operation was being attempted when a conflict occurred
    + *

    What operation was being attempted when a conflict occurred

    * The SyncProvider interface defines four constants * describing states that may occur. Three * constants describe the type of operation (update, delete, or insert) that a @@ -106,10 +109,10 @@ import java.sql.SQLException; * These constants are the possible return values when a SyncResolver object * calls the method getStatus. *
    - *     int operation = resolver.getStatus();
    + *     {@code int operation = resolver.getStatus(); }
      * 
    *

    - *

  • The value in the data source that caused a conflict
    + *

    The value in the data source that caused a conflict

    * A conflict exists when a value that a RowSet object has changed * and is attempting to write to the data source * has also been changed in the data source since the last synchronization. An @@ -122,7 +125,6 @@ import java.sql.SQLException; * * Note that the column in resolver can be designated by the column number, * as is done in the preceding line of code, or by the column name. - *
*

* With the information retrieved from the methods getStatus and * getConflictValue, the application may make a determination as to @@ -193,7 +195,8 @@ import java.sql.SQLException; * code fragment, the value in crs is the one set as the resolved value, which means * that it will be used to overwrite the conflict value in the data source. * - *

{@code
+ * 
+ * {@code
  *     try {
  *
  *         crs.acceptChanges(con);
-- 
GitLab