package.html revision 3910
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<html>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<head>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <meta http-equiv="Content-Type"
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk content="text/html; charset=iso-8859-1">
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<!--
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkCopyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkDO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThis code is free software; you can redistribute it and/or modify it
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkunder the terms of the GNU General Public License version 2 only, as
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkpublished by the Free Software Foundation. Oracle designates this
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkparticular file as subject to the "Classpath" exception as provided
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkby Oracle in the LICENSE file that accompanied this code.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThis code is distributed in the hope that it will be useful, but WITHOUT
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkversion 2 for more details (a copy is included in the LICENSE file that
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkaccompanied this code).
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkYou should have received a copy of the GNU General Public License version
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk2 along with this work; if not, write to the Free Software Foundation,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkInc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkPlease contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkor visit www.oracle.com if you need additional information or have any
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkquestions.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk-->
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <title>javax.sql.rowset Package</title>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk</head>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <body bgcolor="#ffffff">
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<!-- Description clause -->
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkStandard interfaces and base classes for JDBC <code>RowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimplementations. This package contains interfaces and classes
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthat a standard <code>RowSet</code> implementation either implements or extends.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<h2>Table of Contents</h2>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<ul>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="#pkgspec">1.0 Package Specification</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="#stdrowset">2.0 Standard RowSet Definitions</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="#impl">3.0 Implementater's Guide</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="#relspec">4.0 Related Specifications</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="#reldocs">5.0 Related Documentation</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk</ul>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<h3><a name="pkgspec">1.0 Package Specification</a></h3>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThis package specifies five standard JDBC <code>RowSet</code> interfaces.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk All five extend the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<a href="/RowSet.html">RowSet</a> interface described in the JDBC 3.0
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkspecification. It is anticipated that additional definitions
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkof more specialized JDBC <code>RowSet</code> types will emerge as this technology
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkmatures. Future definitions <i>should</i> be specified as subinterfaces using
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinheritance similar to the way it is used in this specification.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<i>Note:</i> The interface definitions provided in this package form the basis for
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkall compliant JDBC <code>RowSet</code> implementations. Vendors and more advanced
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdevelopers who intend to provide their own compliant <code>RowSet</code> implementations
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkshould pay particular attention to the assertions detailed in specification
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterfaces.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<h3><a name="stdrowset">2.0 Standard RowSet Definitions</a></h3>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<ul>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="JdbcRowSet.html"><b><code>JdbcRowSet</code></b></a> - A wrapper around
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenka <tt>ResultSet</tt> object that makes it possible to use the result set as a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkJavaBeans<sup><font size=-2>TM</font></sup> component. Thus,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenka <tt>JdbcRowSet</tt> object can be a Bean that any tool
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkmakes available for assembling an application as part of a component based
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkarchitecture . A <tt>JdbcRowSet</tt> object is a connected <code>RowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkobject, that is, it
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<b>must</b> continually maintain its connection to its data source using a JDBC
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenktechnology-enabled driver ("JDBC driver"). In addition, a <code>JdbcRowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkobject provides a fully updatable and scrollable tabular
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdata structure as defined in the JDBC 3.0 specification.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="CachedRowSet.html">
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<b><code>CachedRowSet</code>&trade;</b></a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk - A <tt>CachedRowSet</tt> object is a JavaBeans<sup><font size=-2>TM</font></sup>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk component that is scrollable, updatable, serializable, and generally disconnected from
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk the source of its data. A <tt>CachedRowSet</tt> object
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenktypically contains rows from a result set, but it can also contain rows from any
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkfile with a tabular format, such as a spreadsheet. <tt>CachedRowSet</tt> implementations
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<b>must</b> use the <tt>SyncFactory</tt> to manage and obtain pluggable
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>SyncProvider</code> objects to provide synchronization between the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdisconnected <code>RowSet</code> object and the originating data source.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkTypically a <code>SyncProvider</code> implementation relies upon a JDBC
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdriver to obtain connectivity to a particular data source.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkFurther details on this mechanism are discussed in the <a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkhref="spi/package-summary.html"><code>javax.sql.rowset.spi</code></a> package
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkspecification.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="WebRowSet.html"><b><code>WebRowSet</code></b></a> - A
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>WebRowSet</code> object is an extension of <tt>CachedRowSet</tt>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthat can read and write a <code>RowSet</code> object in a well formed XML format.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThis class calls an <a href="spi/XmlReader.html"><code>XmlReader</code></a> object
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk(an extension of the <a href="/RowSetReader.html"><code>RowSetReader</code></a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterface) to read a rowset in XML format. It calls an
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<a href="spi/XmlWriter.html"><code>XmlWriter</code></a> object (an extension of the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<a href="/RowSetWriter.html"><code>RowSetWriter</code></a> interface)
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkto write a rowset in XML format. The reader and writer required by
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>WebRowSet</code> objects are provided by the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>SyncFactory</code> in the form of <code>SyncProvider</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimplementations. In order to ensure well formed XML usage, a standard generic XML
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkSchema is defined and published at
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>http://java.sun.com/xml/ns/jdbc/webrowset.xsd</code></a>.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="FilteredRowSet.html"><b><code>FilteredRowSet</code></b></a> - A
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<tt>FilteredRowSet</tt> object provides filtering functionality in a programmatic
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkand extensible way. There are many instances when a <tt>RowSet</tt> <code>object</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkhas a need to provide filtering in its contents without sacrificing the disconnected
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkenvironment, thus saving the expense of having to create a connection to the data source.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkSolutions to this need vary from providing heavyweight full scale
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkSQL query abilities, to portable components, to more lightweight
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkapproaches. A <code>FilteredRowSet</code> object consumes
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkan implementation of the <a href="Predicate.html"><code>Predicate</code></a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterface, which <b>may</b> define a filter at run time. In turn, a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>FilteredRowSet</code> object is tasked with enforcing the set filter for both
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinbound and outbound read and write operations. That is, all filters can be
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkconsidered as bi-directional. No standard filters are defined;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkhowever, sufficient mechanics are specified to permit any required filter to be
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimplemented.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><a href="JoinRowSet.html"><b><code>JoinRowSet</code></b></a> - The <tt>JoinRowSet</tt>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterface describes a mechanism by which relationships can be established between
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenktwo or more standard <code>RowSet</code> implementations. Any number of <tt>RowSet</tt>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk objects can be added to a <tt>JoinRowSet</tt> object provided the <tt>RowSet</tt>objects
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkcan be related in a SQL <tt>JOIN</tt> like fashion. By definition, the SQL <tt>JOIN</tt>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkstatement is used to combine the data contained in two (<i>or more</i>) relational
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdatabase tables based upon a common attribute. By establishing and then enforcing
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkcolumn matches, a <tt>JoinRowSet</tt> object establishes relationships between
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<tt>RowSet</tt> instances without the need to touch the originating data source.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk</ul>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<h3><a name="impl">3.0 Implementer's Guide</a></h3>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkCompliant implementations of JDBC <code>RowSet</code> Implementations
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<b>must</b> follow the assertions described in this specification. In accordance
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkwith the terms of the <a href="http://www.jcp.org">Java Community Process</a>, a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkTest Compatibility Kit (TCK) can be licensed to ensure compatibility with the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkspecification. The following paragraphs outline a number of starting points for
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimplementers of the standard JDBC <code>RowSet</code> definitions. Implementers
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkshould also consult the <i>Implementer's Guide</i> in the <a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkhref="spi/package-summary.html">javax.sql.rowset.spi</a> package for guidelines
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkon <a href="spi/SyncProvider.html"><code>SyncProvider</code></a> implementations.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<ul>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.1 Constructor</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk All <code>RowSet</code> implementations <strong>must</strong> provide a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkno-argument constructor.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk</li>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.2 Role of the <code>BaseRowSet</code> Class</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkA compliant JDBC <code>RowSet</code> implementation <b>must</b> implement one or more
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkstandard interfaces specified in this package and and <b>may</b> extend the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<a href="BaseRowSet.html"><code>BaseRowSet</code></a> abstract class. For example, a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>CachedRowSet</code> implementation must implement the <code>CachedRowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterface and extend the <code>BaseRowSet</code> abstract class. The
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>BaseRowSet</code> class provides the standard architecture on which all
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>RowSet</code> implementations should be built, regardless of whether the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>RowSet</code> objects exist in a connected or disconnected environment.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThe <tt>BaseRowSet</tt> abstract class provides any <tt>RowSet</tt> implementation
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkwith its base functionality, including property manipulation and event notification
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthat is fully compliant with <a href="http://java.sun.com/products/javabeans">JavaBeans</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkcomponent requirements. As an example, all implementations provided in the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkreference implementations (contained in the <tt>com.sun.rowset</tt> package) use
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthe <tt>BaseRowSet</tt> class as a basis for their implementations.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<P>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThe following table illustrates the features that the <code>BaseRowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkabstract class provides.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <blockquote>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <table cellpadding="2" cellspacing="2" border="1" width="75%">
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <tbody>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top"><b>Feature</b><br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top"><b>Details</b><br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Properties<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Provides standard JavaBeans property manipulation
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk mechanisms to allow applications to get and set <code>RowSet</code> command and
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkproperty values. Refer to the documentation of the <tt>javax.sql.RowSet</tt>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterface (available in the JDBC 3.0 specification) for more details on
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthe standard <code>RowSet</code> properties.<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Event notification<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Provides standard JavaBeans event notifications
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk to registered event listeners. Refer to the documentation of <tt>javax.sql.RowSetEvent
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tt> interface (available in the JDBC 3.0 specification) for
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkmore details on how to register and handle standard RowSet events generated
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkby compliant implementations.<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Setters for a RowSet object's command<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Provides a complete set of setter methods
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk for setting RowSet command parameters.<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Streams<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <td valign="top">Provides fields for storing of stream instances
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk in addition to providing a set of constants for stream type designation.<br>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </td>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tr>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </tbody>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </table>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk </blockquote>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.3 Connected RowSet Requirements</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThe <code>JdbcRowSet</code> describes a <code>RowSet</code> object that <b>must</b> always
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkbe connected to the originating data source. Implementations of the <code>JdbcRowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkshould ensure that this connection is provided solely by a JDBC driver.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkFurthermore, <code>RowSet</code> objects that are implementations of the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>JdbcRowSet</code> interface and are therefore operating in a connected environment
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdo not use the <code>SyncFactory</code> to obtain a <code>RowSetReader</code> object
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkor a <code>RowSetWriter</code> object. They can safely rely on the JDBC driver to
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenksupply their needs by virtue of the presence of an underlying updatable and scrollable
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>ResultSet</code> implementation.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<b>3.4 Disconnected RowSet Requirements</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkA disconnected <code>RowSet</code> object, such as a <code>CachedRowSet</code> object,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<b>should</b> delegate
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkconnection management to a <code>SyncProvider</code> object provided by the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>SyncFactory</code>. To ensure fully disconnected semantics, all
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkdisconnected <code>RowSet</code> objects <b>must</b> ensure
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthat the original connection made to the data source to populate the <code>RowSet</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkobject is closed to permit the garbage collector to recover and release resources. The
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>SyncProvider</code> object ensures that the critical JDBC properties are
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkmaintained in order to re-establish a connection to the data source when a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenksynchronization is required. A disconnected <code>RowSet</code> object should
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenktherefore ensure that no
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkextraneous references remain on the <code>Connection</code> object.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.5 Role of RowSetMetaDataImpl</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThe <code>RowsetMetaDataImpl</code> class is a utility class that provides an implementation of the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<a href="/RowSetMetaData.html">RowSetMetaData</a> interface, supplying standard setter
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkmethod implementations for metadata for both connected and disconnected
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>RowSet</code> objects. All implementations are free to use this standard
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimplementation but are not required to do so.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.6 RowSetWarning Class</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThe <code>RowSetWarning</code> class provides warnings that can be set
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkon <code>RowSet</code> implementations.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkSimilar to <a href="/java/sql/SQLWarning.html">SQLWarning</a> objects,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>RowSetWarning</code> objects are silently chained to the object whose method
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkcaused the warning to be thrown. All <code>RowSet</code> implementations <b>should</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkensure that this chaining occurs if a warning is generated and also ensure that the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkwarnings are available via the <code>getRowSetWarnings</code> method defined in either
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkthe <code>JdbcRowSet</code> interface or the <code>CachedRowSet</code> interface.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkAfter a warning has been retrieved with one of the
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>getRowSetWarnings</code> methods, the <code>RowSetWarning</code> method
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>getNextWarning</code> can be called on it to retrieve any warnings that might
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkbe chained on it. If a warning is returned, <code>getNextWarning</code> can be called
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkon it, and so on until there are no more warnings.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<P>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.7 The Joinable Interface</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<P>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkThe <code>Joinable</code> interface provides both connected and disconnected
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>RowSet</code> objects with the capability to be added to a
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<code>JoinRowSet</code> object in an SQL <code>JOIN</code> operation.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkA <code>RowSet</code> object that has implemented the <code>Joinable</code>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkinterface can set a match column, retrieve a match column, or unset a match column.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkA <code>JoinRowSet</code> object can then use the <code>RowSet</code> object's
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkmatch column as a basis for adding the <code>RowSet</code> object.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk</li>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk<li><b>3.8 The RowSetFactory Interface</b>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk <p>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk A <code>RowSetFactory</code> implementation <strong>must</strong>
be provided.
</li>
</ul>
<h3><a name="relspec">4.0 Related Specifications</a></h3>
<ul>
<li><a href="http://java.sun.com/products/jdbc">JDBC 3.0 Specification</a>
<li><a href="http://www.w3.org/XML/Schema">XML Schema</a>
<li><a href="http://www.syncml.org">SyncML</a>
</ul>
<h3><a name="reldocs">5.0 Related Documentation</a></h3>
<ul>
<li><a href="http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html">
JDBC RowSet Tutorial</a>
</ul>
</body>
</html>