提交 7dec4f80 编写于 作者: L lancea

8017471: Fix JDBC -Xdoclint public errors

Reviewed-by: darcy
上级 019c9349
/*
* 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 Java<sup><font size=-2>TM</font></sup> programming
* the Java&trade; programming
* language of an SQL
* <code>BLOB</code> value. An SQL <code>BLOB</code> is a built-in type
* that stores a Binary Large Object as a column value in a row of
......
......@@ -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 <T> 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 <T> 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
......
/*
* 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 Java<sup><font size=-2>TM</font></sup> programming language
* The mapping in the Java&trade; programming language
* for the SQL <code>CLOB</code> type.
* An SQL <code>CLOB</code> is a built-in type
* that stores a Character Large Object as a column value in a row of
......
......@@ -31,7 +31,7 @@ package java.sql;
* <P>
* 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 JDBC<sup><font size=-2>TM</font></sup> technology
* the driver based on JDBC&trade; 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:
* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code>
* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
* @return <code>true</code> if so; <code>false</code> otherwise
* @exception SQLException if a database access error occurs
* @see Connection
......
......@@ -144,7 +144,7 @@ public interface Driver {
/**
* Reports whether this driver is a genuine JDBC
* Compliant<sup><font size=-2>TM</font></sup> driver.
* Compliant&trade; driver.
* A driver may only report <code>true</code> here if it passes the JDBC
* compliance tests; otherwise it is required to return <code>false</code>.
* <P>
......@@ -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 <code>java.util.logging<code>.
* @throws SQLFeatureNotSupportedException if the driver does not use
* {@code java.util.logging}.
* @since 1.7
*/
public Logger getParentLogger() throws SQLFeatureNotSupportedException;
......
......@@ -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.
* <o>
* <p>
* 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
......
/*
* 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 Java<sup><font size=-2>TM</font></sup> programming language
* The mapping in the Java&trade; programming language
* for the SQL <code>NCLOB</code> type.
* An SQL <code>NCLOB</code> is a built-in type
* that stores a Character Large Object using the National Character Set
......
......@@ -90,7 +90,7 @@ import java.io.InputStream;
* the intended columns, which can be assured with the SQL <i>AS</i> clause.
* <P>
* A set of updater methods were added to this interface
* in the JDBC 2.0 API (Java<sup><font size=-2>TM</font></sup> 2 SDK,
* in the JDBC 2.0 API (Java&trade; 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 <T> 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 <T> 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
......
......@@ -444,6 +444,7 @@ public interface SQLInput {
*<p>
* The default implementation will throw {@code SQLFeatureNotSupportedException}
*
* @param<T> 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}
......
......@@ -103,7 +103,6 @@ import java.security.*;
* <td>Permits an application to remove a JDBC driver from the list of
* registered Drivers and release its resources.</td>
* </tr>
* </tr>
* </table>
*<p>
* @since 1.3
......
/*
* 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());
* </pre>
*
* @param <T> 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();
* </pre>
*
* @param <T> 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:
......
/*
* 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 <code>SQLException</code> is thrown.
*
* @param <T> 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
......
/*
* 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 <code>java.util.logging<code>.
* @throws SQLFeatureNotSupportedException if the data source does not use
* {@code java.util.logging}
* @since 1.7
*/
public Logger getParentLogger() throws SQLFeatureNotSupportedException;
......
/*
* 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 <code>PooledConnection</code>
* objects. An object that implements this interface will typically be
* registered with a naming service that is based on the
* Java<sup><font size=-2>TM</font></sup> Naming and Directory Interface
* Java&trade; Naming and Directory Interface
* (JNDI).
*
* @since 1.4
......
......@@ -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
* Java<sup><font size=-2>TM</font></sup> Naming and Directory (JNDI) API.
* Java&trade; Naming and Directory (JNDI) API.
* <P>
* The {@code DataSource} interface is implemented by a driver vendor.
* There are three types of implementations:
......
/*
* 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
* JavaBeans<sup><font size=-2>TM</font></sup> component model.
* JavaBeans&trade; 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.
......
/*
* 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 Interface<sup><font size=-3>TM</font></sup>
* Java Naming and Directory Interface&trade;
* (JNDI).
* <p>
* An implementation of {@code XADataSource} must include a public no-arg
......
/*
* 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 <code>RowSet</code> object with its basic functionality.
* The basic functions include having properties and sending event notifications,
* which all JavaBeans<sup><font size=-2>TM</font></sup> components must implement.
* which all JavaBeans&trade; components must implement.
* <P>
* <h3>1.0 Overview</h3>
* The <code>BaseRowSet</code> class provides the core functionality
......@@ -93,7 +93,7 @@ import javax.sql.rowset.serial.*;
* NOTE: In order to use a <code>DataSource</code> object for making a
* connection, the <code>DataSource</code> object must have been registered
* with a naming service that uses the Java Naming and Directory
* Interface<sup><font size=-2>TM</font></sup> (JNDI) API. This registration
* Interface&trade; (JNDI) API. This registration
* is usually done by a person acting in the capacity of a system administrator.
* <P>
* <h3>3.0 Setting the Command and Its Parameters</h3>
......@@ -106,7 +106,7 @@ import javax.sql.rowset.serial.*;
* to <code>null</code> if required.
* <P>
* The following code fragment illustrates how the
* <code>CachedRowSet</code><sup><font size=-2>TM</font></sup>
* <code>CachedRowSet</code>&trade;
* object <code>crs</code> 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.
* <PRE>{@code
......
/*
* 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 <code>CachedRowSet</code> 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
* JavaBeans<sup><font size=-2>TM</font></sup> component and is scrollable,
* JavaBeans&trade; component and is scrollable,
* updatable, and serializable. A <code>CachedRowSet</code> 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 <code>DataSource</code> object for making a
* connection, the <code>DataSource</code> object must have been registered
* with a naming service that uses the Java Naming and Directory
* Interface<sup><font size=-2>TM</font></sup> (JNDI) API. This registration
* Interface&trade; (JNDI) API. This registration
* is usually done by a person acting in the capacity of a system
* administrator.
* <P>
......@@ -734,7 +734,6 @@ public interface CachedRowSet extends RowSet, Joinable {
* source. Otherwise, the application <b>must</b> explicity call the
* <code>commit()</code> or <code>rollback()</code> 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 {
* <code>commit</code> or <code>rollback</code> methods as appropriate.
*
* @param con a standard JDBC <code>Connection</code> 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 <code>WebRowSet</code> object from the <code>CachedRowSet</code>
* object returned by this method in order
* to export the <code>RowSet</code> 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
* <code>CachedRowSet</code> 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
* <code>CachedRowSet</code> populated should fire; the default value
* is zero; cannot be less than <code>fetchSize</code> or zero
* @throws SQLException {@code numRows < 0 or numRows < getFetchSize() }
*/
public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException;
......
/*
* 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.*;
* <p>
* A JDBC <code>FilteredRowSet</code> standard implementation implements the
* <code>RowSet</code> interfaces and extends the
* <code>CachedRowSet</code><sup><font size=-2>TM</font></sup> class. The
* <code>CachedRowSet</code>&trade; class. The
* <code>CachedRowSet</code> class provides a set of protected cursor manipulation
* methods, which a <code>FilteredRowSet</code> implementation can override
* to supply filtering support.
......@@ -69,8 +69,8 @@ import java.math.*;
* class JavaDoc), a <code>FilteredRowSet</code> could then be used as described
* below.
* <P>
* <code>
* <pre>
* {@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
* }
* </pre>
* </code>
* In the example above, we initialize a <code>Range</code> object which
* implements the <code>Predicate</code> interface. This object expresses
* the following constraints: All rows outputted or modified from this
......
/*
* 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.*;
*
* <h3>1.0 Overview</h3>
* A wrapper around a <code>ResultSet</code> object that makes it possible
* to use the result set as a JavaBeans<sup><font size=-2>TM</font></sup>
* to use the result set as a JavaBeans&trade;
* component. Thus, a <code>JdbcRowSet</code> object can be one of the Beans that
* a tool makes available for composing an application. Because
* a <code>JdbcRowSet</code> is a connected rowset, that is, it continually
......@@ -113,7 +113,7 @@ import java.io.*;
* <P>
* The implementation of the <code>RowSet</code> method <code>execute</code> in the
* <code>JdbcRowSet</code> reference implementation differs from that in the
* <code>CachedRowSet</code><sup><font size=-2>TM</font></sup>
* <code>CachedRowSet</code>&trade;
* reference implementation to account for the different
* requirements of connected and disconnected <code>RowSet</code> objects.
* <p>
......@@ -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 <code>JdbcRowSet</code> transaction behavior.
* <p>
* Sets the current auto-commit mode for this <code>Connection</code> 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 <code>Connection</code>
* 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 <code>Connection</code>
* object within this <code>JdbcRowSet</code> is in auto-commit mode.
* @see #rollback
......
/*
* 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 <code>JoinRowSet</code> object can now add this <code>RowSet</code>
* object based on the match column.
* <p>
* Sub-interfaces such as the <code>CachedRowSet</code><sup><font size=-2>TM</font></sup>
* Sub-interfaces such as the <code>CachedRowSet</code>&trade;
* interface define the method <code>CachedRowSet.setKeyColumns</code>, which allows
* primary key semantics to be enforced on specific columns.
* Implementations of the <code>setMatchColumn(int columnIdx)</code> method
......
/*
* 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 <code>true</code> if there are more rows in the filter;
* <code>false</code> otherwise
*/
......
/*
* 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 () {
}
......
/*
* 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 <code>SQLWarning</code> class.
* <P>
* Rowset warnings may be retrieved from <code>JdbcRowSet</code>,
* <code>CachedRowSet</code><sup><font size=-2>TM</font></sup>,
* <code>CachedRowSet</code>&trade;,
* <code>WebRowSet</code>, <code>FilteredRowSet</code>, or <code>JoinRowSet</code>
* implementations. To retrieve the first warning reported on any
* <code>RowSet</code>
......
/*
* 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 <code>WebRowSet</code>
* The standard interface that all implementations of a {@code WebRowSet}
* must implement.
* <P>
* <h3>1.0 Overview</h3>
* The <code>WebRowSetImpl</code> provides the standard
* The {@code WebRowSetImpl} provides the standard
* reference implementation, which may be extended if required.
* <P>
* The standard WebRowSet XML Schema definition is available at the following
* URI:
* <ul>
* <pre>
* <li>
* <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
* </pre>
* </li>
* </ul>
* It describes the standard XML document format required when describing a
* <code>RowSet</code> object in XML and must be used be all standard implementations
* of the <code>WebRowSet</code> interface to ensure interoperability. In addition,
* the <code>WebRowSet</code> 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:
* <ul>
* <pre>
* <li>
* <a href="http://standards.iso.org/iso/9075/2002/12/sqlxml">http://standards.iso.org/iso/9075/2002/12/sqlxml</a>
* </pre>
* </li>
* </ul>
* The schema definition describes the internal data of a <code>RowSet</code> object
* The schema definition describes the internal data of a {@code RowSet} object
* in three distinct areas:
* <UL>
* <li><b>properties</b></li>
* These properties describe the standard synchronization provider properties in
* addition to the more general <code>RowSet</code> properties.
* <p>
* <li><b>metadata</b></li>
* This describes the metadata associated with the tabular structure governed by a
* <code>WebRowSet</code> object. The metadata described is closely aligned with the
* metadata accessible in the underlying <code>java.sql.ResultSet</code> interface.
* <p>
* <li><b>data</b></li>
* This describes the original data (the state of data since the last population
* or last synchronization of the <code>WebRowSet</code> object) and the current
* <li>properties - These properties describe the standard synchronization
* provider properties in addition to the more general {@code RowSet} properties.
* </li>
* <li>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.
* </li>
* <li>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 <code>WebRowSet</code> 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.
* </li>
* </ul>
* <P>
* <h3>2.0 WebRowSet States</h3>
* The following sections demonstrates how a <code>WebRowSet</code> 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 <code>WebRowSet</code> object in XML.
* and to describe the state of a {@code WebRowSet} object in XML.
* <p>
* <h4>2.1 State 1 - Outputting a <code>WebRowSet</code> Object to XML</h3>
* In this example, a <code>WebRowSet</code> 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</code> object
* <h4>2.1 State 1 - Outputting a {@code WebRowSet} Object to XML</h4>
* 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 <code>CachedRowSet</code><sup><font size=-2>TM</font></sup> interface
* the {@code CachedRowSet}&trade; interface
* provide key details that describe WebRowSet
* properties. Outputting the WebRowSet object to XML using the standard
* <code>writeXml</code> methods describes the internal properties as follows:
* {@code writeXml} methods describes the internal properties as follows:
* <PRE>
* &lt;<font color=red>properties</font>&gt;
* &lt;<font color=red>command</font>&gt;select co1, col2 from test_table&lt;<font color=red>/command</font>&gt;
* &lt;<font color=red>concurrency</font>&gt;1&lt;<font color=red>/concurrency</font>&gt;
* &lt;<font color=red>datasource/</font>&gt;
* &lt;<font color=red>escape-processing</font>&gt;true&lt;<font color=red>/escape-processing</font>&gt;
* &lt;<font color=red>fetch-direction</font>&gt;0&lt;<font color=red>/fetch-direction</font>&gt;
* &lt;<font color=red>fetch-size</font>&gt;0&lt;<font color=red>/fetch-size</font>&gt;
* &lt;<font color=red>isolation-level</font>&gt;1&lt;<font color=red>/isolation-level</font>&gt;
* &lt;<font color=red>key-columns/</font>&gt;
* &lt;<font color=red>map/</font>&gt;
* &lt;<font color=red>max-field-size</font>&gt;0&lt;<font color=red>/max-field-size</font>&gt;
* &lt;<font color=red>max-rows</font>&gt;0&lt;<font color=red>/max-rows</font>&gt;
* &lt;<font color=red>query-timeout</font>&gt;0&lt;<font color=red>/query-timeout</font>&gt;
* &lt;<font color=red>read-only</font>&gt;false&lt;<font color=red>/read-only</font>&gt;
* &lt;<font color=red>rowset-type</font>&gt;TRANSACTION_READ_UNCOMMITED&lt;<font color=red>/rowset-type</font>&gt;
* &lt;<font color=red>show-deleted</font>&gt;false&lt;<font color=red>/show-deleted</font>&gt;
* &lt;<font color=red>table-name/</font>&gt;
* &lt;<font color=red>url</font>&gt;jdbc:thin:oracle&lt;<font color=red>/url</font>&gt;
* &lt;<font color=red>sync-provider</font>&gt;
* &lt;<font color=red>sync-provider-name</font>&gt;.com.rowset.provider.RIOptimisticProvider&lt;<font color=red>/sync-provider-name</font>&gt;
* &lt;<font color=red>sync-provider-vendor</font>&gt;Oracle Corporation&lt;<font color=red>/sync-provider-vendor</font>&gt;
* &lt;<font color=red>sync-provider-version</font>&gt;1.0&lt;<font color=red>/sync-provider-name</font>&gt;
* &lt;<font color=red>sync-provider-grade</font>&gt;LOW&lt;<font color=red>/sync-provider-grade</font>&gt;
* &lt;<font color=red>data-source-lock</font>&gt;NONE&lt;<font color=red>/data-source-lock</font>&gt;
* &lt;<font color=red>/sync-provider</font>&gt;
* &lt;<font color=red>/properties</font>&gt;
* </PRE>
* {@code
* <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>
* } </PRE>
* The meta-data describing the make up of the WebRowSet is described
* in XML as detailed below. Note both columns are described between the
* <code>column-definition</code> tags.
* {@code column-definition} tags.
* <PRE>
* &lt;<font color=red>metadata</font>&gt;
* &lt;<font color=red>column-count</font>&gt;2&lt;<font color=red>/column-count</font>&gt;
* &lt;<font color=red>column-definition</font>&gt;
* &lt;<font color=red>column-index</font>&gt;1&lt;<font color=red>/column-index</font>&gt;
* &lt;<font color=red>auto-increment</font>&gt;false&lt;<font color=red>/auto-increment</font>&gt;
* &lt;<font color=red>case-sensitive</font>&gt;true&lt;<font color=red>/case-sensitive</font>&gt;
* &lt;<font color=red>currency</font>&gt;false&lt;<font color=red>/currency</font>&gt;
* &lt;<font color=red>nullable</font>&gt;1&lt;<font color=red>/nullable</font>&gt;
* &lt;<font color=red>signed</font>&gt;false&lt;<font color=red>/signed</font>&gt;
* &lt;<font color=red>searchable</font>&gt;true&lt;<font color=red>/searchable</font>&gt;
* &lt;<font color=red>column-display-size</font>&gt;10&lt;<font color=red>/column-display-size</font>&gt;
* &lt;<font color=red>column-label</font>&gt;COL1&lt;<font color=red>/column-label</font>&gt;
* &lt;<font color=red>column-name</font>&gt;COL1&lt;<font color=red>/column-name</font>&gt;
* &lt;<font color=red>schema-name/</font>&gt;
* &lt;<font color=red>column-precision</font>&gt;10&lt;<font color=red>/column-precision</font>&gt;
* &lt;<font color=red>column-scale</font>&gt;0&lt;<font color=red>/column-scale</font>&gt;
* &lt;<font color=red>table-name/</font>&gt;
* &lt;<font color=red>catalog-name/</font>&gt;
* &lt;<font color=red>column-type</font>&gt;1&lt;<font color=red>/column-type</font>&gt;
* &lt;<font color=red>column-type-name</font>&gt;CHAR&lt;<font color=red>/column-type-name</font>&gt;
* &lt;<font color=red>/column-definition</font>&gt;
* &lt;<font color=red>column-definition</font>&gt;
* &lt;<font color=red>column-index</font>&gt;2&lt;<font color=red>/column-index</font>&gt;
* &lt;<font color=red>auto-increment</font>&gt;false&lt;<font color=red>/auto-increment</font>&gt;
* &lt;<font color=red>case-sensitive</font>&gt;false&lt;<font color=red>/case-sensitive</font>&gt;
* &lt;<font color=red>currency</font>&gt;false&lt;<font color=red>/currency</font>&gt;
* &lt;<font color=red>nullable</font>&gt;1&lt;<font color=red>/nullable</font>&gt;
* &lt;<font color=red>signed</font>&gt;true&lt;<font color=red>/signed</font>&gt;
* &lt;<font color=red>searchable</font>&gt;true&lt;<font color=red>/searchable</font>&gt;
* &lt;<font color=red>column-display-size</font>&gt;39&lt;<font color=red>/column-display-size</font>&gt;
* &lt;<font color=red>column-label</font>&gt;COL2&lt;<font color=red>/column-label</font>&gt;
* &lt;<font color=red>column-name</font>&gt;COL2&lt;<font color=red>/column-name</font>&gt;
* &lt;<font color=red>schema-name/</font>&gt;
* &lt;<font color=red>column-precision</font>&gt;38&lt;<font color=red>/column-precision</font>&gt;
* &lt;<font color=red>column-scale</font>&gt;0&lt;<font color=red>/column-scale</font>&gt;
* &lt;<font color=red>table-name/</font>&gt;
* &lt;<font color=red>catalog-name/</font>&gt;
* &lt;<font color=red>column-type</font>&gt;3&lt;<font color=red>/column-type</font>&gt;
* &lt;<font color=red>column-type-name</font>&gt;NUMBER&lt;<font color=red>/column-type-name</font>&gt;
* &lt;<font color=red>/column-definition</font>&gt;
* &lt;<font color=red>/metadata</font>&gt;
* </PRE>
* {@code
* <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>
* }</PRE>
* Having detailed how the properties and metadata are described, the following details
* how the contents of a <code>WebRowSet</code> object is described in XML. Note, that
* this describes a <code>WebRowSet</code> 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 <code>currentRow</code> tag is mapped to each row of the table structure that the
* <code>WebRowSet</code> object provides. A <code>columnValue</code> tag may contain
* either the <code>stringData</code> or <code>binaryData</code> 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 <code>binaryData</code> tag contains data in the
* Base64 encoding and is typically used for <code>BLOB</code> and <code>CLOB</code> 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.
* <PRE>
* &lt;<font color=red>data</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* {@code
* <data>
* <currentRow>
* <columnValue>
* firstrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 1
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* secondrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 2
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* thirdrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 3
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* fourthrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 4
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>/data</font>&gt;
* </PRE>
* </columnValue>
* </currentRow>
* </data>
* }</PRE>
* <h4>2.2 State 2 - Deleting a Row</h4>
* Deleting a row in a <code>WebRowSet</code> object involves simply moving to the row
* to be deleted and then calling the method <code>deleteRow</code>, as in any other
* <code>RowSet</code> object. The following
* two lines of code, in which <i>wrs</i> is a <code>WebRowSet</code> 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 <i>wrs</i> is a {@code WebRowSet} object, delete
* the third row.
* <PRE>
* wrs.absolute(3);
* wrs.deleteRow();
* </PRE>
* The XML description shows the third row is marked as a <code>deleteRow</code>,
* which eliminates the third row in the <code>WebRowSet</code> object.
* The XML description shows the third row is marked as a {@code deleteRow},
* which eliminates the third row in the {@code WebRowSet} object.
* <PRE>
* &lt;<font color=red>data</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* {@code
* <data>
* <currentRow>
* <columnValue>
* firstrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 1
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* secondrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 2
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>deleteRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <deleteRow>
* <columnValue>
* thirdrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 3
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/deleteRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </deleteRow>
* <currentRow>
* <columnValue>
* fourthrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 4
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>/data</font>&gt;
* </PRE>
* </columnValue>
* </currentRow>
* </data>
*} </PRE>
* <h4>2.3 State 3 - Inserting a Row</h4>
* A <code>WebRowSet</code> 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 <code>insertRow</code>.
* calling the method {@code insertRow}.
* <PRE>
* {@code
* wrs.moveToInsertRow();
* wrs.updateString(1, "fifththrow");
* wrs.updateString(2, "5");
* wrs.insertRow();
* </PRE>
* }</PRE>
* 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 <code>next</code> moves the cursor to the correct row.
* Calling the method <code>acceptChanges</code> 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.
*
* <PRE>
* wrs.moveToCurrentRow();
* {@code wrs.moveToCurrentRow();
* wrs.next();
* wrs.updateString(2, "V");
* wrs.acceptChanges();
* :
* </PRE>
* }</PRE>
* 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.
* <PRE>
* &lt;<font color=red>data</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* {@code
* <data>
* <currentRow>
* <columnValue>
* firstrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 1
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* secondrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 2
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* newthirdrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* III
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>insertRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <insertRow>
* <columnValue>
* fifthrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 5
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>updateValue</font>&gt;
* </columnValue>
* <updateValue>
* V
* &lt;<font color=red>/updateValue</font>&gt;
* &lt;<font color=red>/insertRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </updateValue>
* </insertRow>
* <currentRow>
* <columnValue>
* fourthrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 4
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>/date</font>&gt;
* </PRE>
* </columnValue>
* </currentRow>
* </date>
*} </PRE>
* <h4>2.4 State 4 - Modifying a Row</h4>
* 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.
* <PRE>
*{@code
* wrs.absolute(5);
* wrs.updateString(1, "new4thRow");
* wrs.updateString(2, "IV");
* wrs.updateRow();
* </PRE>
* In XML, this is described by the <code>modifyRow</code> tag. Both the original and new
* }</PRE>
* 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.
* <PRE>
* &lt;<font color=red>data</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* {@code
* <data>
* <currentRow>
* <columnValue>
* firstrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 1
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* secondrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 2
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* newthirdrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* III
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>currentRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <currentRow>
* <columnValue>
* fifthrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* <columnValue>
* 5
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>/currentRow</font>&gt;
* &lt;<font color=red>modifyRow</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </columnValue>
* </currentRow>
* <modifyRow>
* <columnValue>
* fourthrow
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>updateValue</font>&gt;
* </columnValue>
* <updateValue>
* new4thRow
* &lt;<font color=red>/updateValue</font>&gt;
* &lt;<font color=red>columnValue</font>&gt;
* </updateValue>
* <columnValue>
* 4
* &lt;<font color=red>/columnValue</font>&gt;
* &lt;<font color=red>updateValue</font>&gt;
* </columnValue>
* <updateValue>
* IV
* &lt;<font color=red>/updateValue</font>&gt;
* &lt;<font color=red>/modifyRow</font>&gt;
* &lt;<font color=red>/data</font>&gt;
* </PRE>
* </updateValue>
* </modifyRow>
* </data>
* }</PRE>
*
* @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 <code>WebRowSet</code> object in its XML format from the given
* <code>Reader</code> object.
* Reads a {@code WebRowSet} object in its XML format from the given
* {@code Reader} object.
*
* @param reader the <code>java.io.Reader</code> stream from which this
* <code>WebRowSet</code> 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 <code>WebRowSet</code>
* Reads a stream based XML input to populate this {@code WebRowSet}
* object.
*
* @param iStream the <code>java.io.InputStream</code> from which this
* <code>WebRowSet</code> 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 <code>WebRowSet</code> object with
* the contents of the given <code>ResultSet</code> 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 <code>Writer</code> object in XML format.
* to the given {@code Writer} object in XML format.
* <p>
* NOTE: The <code>WebRowSet</code> 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 <b>must</b>
* be returned to its position just prior to the <code>writeXml()</code> call.
* be returned to its position just prior to the {@code writeXml()} call.
*
* @param rs the <code>ResultSet</code> object with which to populate this
* <code>WebRowSet</code> object
* @param writer the <code>java.io.Writer</code> 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 <code>WebRowSet</code> object with
* the contents of the given <code>ResultSet</code> 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 <code>OutputStream</code> object in XML format.
* to the given {@code OutputStream} object in XML format.
* <p>
* NOTE: The <code>WebRowSet</code> 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 <b>must</b>
* be returned to its position just prior to the <code>writeXml()</code> call.
* be returned to its position just prior to the {@code writeXml()} call.
*
* @param rs the <code>ResultSet</code> object with which to populate this
* <code>WebRowSet</code> object
* @param oStream the <code>java.io.OutputStream</code> 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 <code>WebRowSet</code> object
* to the given <code>Writer</code> 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 <code>java.io.Writer</code> 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 <code>WebRowSet</code> object
* to the given <code>OutputStream</code> 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 <code>java.io.OutputStream</code> 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 <code>WebRowSet</code> 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 <code>WebRowSet</code> implementation.
* their valid values for a {@code WebRowSet} implementation.
*/
public static String SCHEMA_SYSTEM_ID = "http://java.sun.com/xml/ns/jdbc/webrowset.xsd";
}
......@@ -67,7 +67,7 @@ interfaces.
<ul>
<li><a href="JdbcRowSet.html"><b><code>JdbcRowSet</code></b></a> - A wrapper around
a <tt>ResultSet</tt> object that makes it possible to use the result set as a
JavaBeans<sup><font size=-2>TM</font></sup> component. Thus,
JavaBeans&trade; component. Thus,
a <tt>JdbcRowSet</tt> object can be a Bean that any tool
makes available for assembling an application as part of a component based
architecture . A <tt>JdbcRowSet</tt> object is a connected <code>RowSet</code>
......@@ -79,7 +79,7 @@ data structure as defined in the JDBC 3.0 specification.
<p>
<li><a href="CachedRowSet.html">
<b><code>CachedRowSet</code>&trade;</b></a>
- A <tt>CachedRowSet</tt> object is a JavaBeans<sup><font size=-2>TM</font></sup>
- A <tt>CachedRowSet</tt> object is a JavaBeans&trade;
component that is scrollable, updatable, serializable, and generally disconnected from
the source of its data. A <tt>CachedRowSet</tt> object
typically contains rows from a result set, but it can also contain rows from any
......
/*
* 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.
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* 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
......
/*
* 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;
* <code>Blob</code> object within a <code>SerialBlob</code> object
* and to update or truncate a <code>Blob</code> object.
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* <p> 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
......
/*
* 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 <code>SerialClob</code> object or to locate the start of
* a pattern of characters.
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* <p> 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
......
/*
* 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);
* </pre>
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* 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 <code>SerialDatalink</code> object from the given
* <code>java.net.URL</code> object.
* <P>
* @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 {
......
......@@ -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 <code>SerialException</code> object being thrown.
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* 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
......
/*
* 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 <code>SerialRef</code> instance from a <code>Ref</code>
* object and provides methods for getting and setting the <code>Ref</code> object.
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* 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
......
/*
* 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.
*
* <h4> Thread safety </h4>
* <h3> Thread safety </h3>
*
* 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
......
/*
* 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 {
* <p>
* Synchronization providers bound to a JNDI context can be
* registered by binding a SyncProvider instance to a JNDI namespace.
* <ul>
*
* <pre>
* {@code
* SyncProvider p = new MySyncProvider();
* InitialContext ic = new InitialContext();
* ic.bind ("jdbc/rowset/MySyncProvider", p);
* </pre>
* </ul>
* } </pre>
*
* Furthermore, an initial JNDI context should be set with the
* <code>SyncFactory</code> using the <code>setJNDIContext</code> method.
* The <code>SyncFactory</code> 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<SyncProvider> 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 {
......
/*
* 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;
* <code>SyncProviderException</code> method <code>getSyncResolver</code> to get
* the <code>SyncResolver</code> object <i>resolver</i>.
* <PRE>
* {@code
* } catch (SyncProviderException spe) {
* SyncResolver resolver = spe.getSyncResolver();
* ...
* }
*
* }
* </PRE>
* <P>
* With <i>resolver</i> 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 <code>SyncResolver</code>
* object:
* <P>
* <LI>What operation was being attempted when a conflict occurred<BR>
* <h3>What operation was being attempted when a conflict occurred</h3>
* The <code>SyncProvider</code> 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 <code>SyncResolver</code> object
* calls the method <code>getStatus</code>.
* <PRE>
* int operation = resolver.getStatus();
* {@code int operation = resolver.getStatus(); }
* </PRE>
* <P>
* <LI>The value in the data source that caused a conflict<BR>
* <h3>The value in the data source that caused a conflict</h3>
* A conflict exists when a value that a <code>RowSet</code> 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;
* </PRE>
* Note that the column in <i>resolver</i> can be designated by the column number,
* as is done in the preceding line of code, or by the column name.
* </UL>
* <P>
* With the information retrieved from the methods <code>getStatus</code> and
* <code>getConflictValue</code>, the application may make a determination as to
......@@ -193,7 +195,8 @@ import java.sql.SQLException;
* code fragment, the value in <i>crs</i> is the one set as the resolved value, which means
* that it will be used to overwrite the conflict value in the data source.
*
* <PRE>{@code
* <PRE>
* {@code
* try {
*
* crs.acceptChanges(con);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册