src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java
author ihse
Thu, 15 Mar 2018 01:32:03 +0100
changeset 49245 6c3054543ede
parent 47216 71c04702a3d5
child 54106 9a90236ab64c
permissions -rw-r--r--
8199636: Unify naming for jaas_unix and jaas_nt Reviewed-by: erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
25976
4de01a56e3ee 8054555: javadoc cleanup for java.sql and javax.sql
lancea
parents: 24968
diff changeset
     2
 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.sql.rowset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.sql.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import javax.sql.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.naming.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.math.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import org.xml.sax.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
/**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    36
 * The standard interface that all implementations of a {@code WebRowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * must implement.
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 18564
diff changeset
    38
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * <h3>1.0 Overview</h3>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    40
 * The {@code WebRowSetImpl} provides the standard
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * reference implementation, which may be extended if required.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * The standard WebRowSet XML Schema definition is available at the following
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * URI:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * <ul>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    46
 * <li>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    48
 * </li>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * It describes the standard XML document format required when describing a
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    51
 * {@code RowSet} object in XML and must be used be all standard implementations
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    52
 * of the {@code WebRowSet} interface to ensure interoperability. In addition,
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    53
 * the {@code WebRowSet} schema uses specific SQL/XML Schema annotations,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * thus ensuring greater cross
25976
4de01a56e3ee 8054555: javadoc cleanup for java.sql and javax.sql
lancea
parents: 24968
diff changeset
    55
 * platform interoperability. This is an effort currently under way at the ISO
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * organization. The SQL/XML definition is available at the following URI:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * <ul>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    58
 * <li>
26973
c96ef212b86d 8059997: Fix broken link in WebRowSet javadoc
lancea
parents: 25991
diff changeset
    59
 * <a href="http://standards.iso.org/iso/9075/2002/12/sqlxml.xsd">http://standards.iso.org/iso/9075/2002/12/sqlxml.xsd</a>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    60
 * </li>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * </ul>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    62
 * The schema definition describes the internal data of a {@code RowSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * in three distinct areas:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <UL>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    65
 * <li>properties - These properties describe the standard synchronization
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    66
 * provider properties in addition to the more general {@code RowSet} properties.
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    67
 * </li>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    68
 * <li>metadata - This describes the metadata associated with the tabular structure governed by a
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    69
 * {@code WebRowSet} object. The metadata described is closely aligned with the
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    70
 * metadata accessible in the underlying {@code java.sql.ResultSet} interface.
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    71
 * </li>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    72
 * <li>data - This describes the original data (the state of data since the
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    73
 * last population
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    74
 * or last synchronization of the {@code WebRowSet} object) and the current
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * data. By keeping track of the delta between the original data and the current data,
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    76
 * a {@code WebRowSet} maintains the ability to synchronize changes
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    77
 * in its data back to the originating data source.
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    78
 * </li>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * </ul>
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 18564
diff changeset
    80
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * <h3>2.0 WebRowSet States</h3>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    82
 * The following sections demonstrates how a {@code WebRowSet} implementation
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * should use the XML Schema to describe update, insert, and delete operations
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    84
 * and to describe the state of a {@code WebRowSet} object in XML.
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 18564
diff changeset
    85
 *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    86
 * <h4>2.1 State 1 - Outputting a {@code WebRowSet} Object to XML</h4>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    87
 * In this example, a {@code WebRowSet} object is created and populated with a simple 2 column,
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    88
 * 5 row table from a data source. Having the 5 rows in a {@code WebRowSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * makes it possible to describe them in XML. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * metadata describing the various standard JavaBeans properties as defined
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * in the RowSet interface plus the standard properties defined in
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    92
 * the {@code CachedRowSet}&trade; interface
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 * provide key details that describe WebRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * properties. Outputting the WebRowSet object to XML using the standard
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    95
 * {@code writeXml} methods describes the internal properties as follows:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    97
 * {@code
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    98
 * <properties>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
    99
 *       <command>select co1, col2 from test_table</command>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   100
 *      <concurrency>1</concurrency>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   101
 *      <datasource/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   102
 *      <escape-processing>true</escape-processing>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   103
 *      <fetch-direction>0</fetch-direction>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   104
 *      <fetch-size>0</fetch-size>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   105
 *      <isolation-level>1</isolation-level>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   106
 *      <key-columns/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   107
 *      <map/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   108
 *      <max-field-size>0</max-field-size>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   109
 *      <max-rows>0</max-rows>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   110
 *      <query-timeout>0</query-timeout>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   111
 *      <read-only>false</read-only>
25976
4de01a56e3ee 8054555: javadoc cleanup for java.sql and javax.sql
lancea
parents: 24968
diff changeset
   112
 *      <rowset-type>TRANSACTION_READ_UNCOMMITTED</rowset-type>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   113
 *      <show-deleted>false</show-deleted>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   114
 *      <table-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   115
 *      <url>jdbc:thin:oracle</url>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   116
 *      <sync-provider>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   117
 *              <sync-provider-name>.com.rowset.provider.RIOptimisticProvider</sync-provider-name>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   118
 *              <sync-provider-vendor>Oracle Corporation</sync-provider-vendor>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   119
 *              <sync-provider-version>1.0</sync-provider-name>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   120
 *              <sync-provider-grade>LOW</sync-provider-grade>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   121
 *              <data-source-lock>NONE</data-source-lock>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   122
 *      </sync-provider>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   123
 * </properties>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   124
 * } </PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 * The meta-data describing the make up of the WebRowSet is described
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * in XML as detailed below. Note both columns are described between the
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   127
 * {@code column-definition} tags.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   129
 * {@code
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   130
 * <metadata>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   131
 *      <column-count>2</column-count>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   132
 *      <column-definition>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   133
 *              <column-index>1</column-index>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   134
 *              <auto-increment>false</auto-increment>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   135
 *              <case-sensitive>true</case-sensitive>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   136
 *              <currency>false</currency>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   137
 *              <nullable>1</nullable>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   138
 *              <signed>false</signed>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   139
 *              <searchable>true</searchable>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   140
 *              <column-display-size>10</column-display-size>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   141
 *              <column-label>COL1</column-label>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   142
 *              <column-name>COL1</column-name>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   143
 *              <schema-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   144
 *              <column-precision>10</column-precision>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   145
 *              <column-scale>0</column-scale>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   146
 *              <table-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   147
 *              <catalog-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   148
 *              <column-type>1</column-type>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   149
 *              <column-type-name>CHAR</column-type-name>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   150
 *      </column-definition>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   151
 *      <column-definition>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   152
 *              <column-index>2</column-index>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   153
 *              <auto-increment>false</auto-increment>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   154
 *              <case-sensitive>false</case-sensitive>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   155
 *              <currency>false</currency>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   156
 *              <nullable>1</nullable>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   157
 *              <signed>true</signed>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   158
 *              <searchable>true</searchable>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   159
 *              <column-display-size>39</column-display-size>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   160
 *              <column-label>COL2</column-label>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   161
 *              <column-name>COL2</column-name>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   162
 *              <schema-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   163
 *              <column-precision>38</column-precision>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   164
 *              <column-scale>0</column-scale>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   165
 *              <table-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   166
 *              <catalog-name/>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   167
 *              <column-type>3</column-type>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   168
 *              <column-type-name>NUMBER</column-type-name>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   169
 *      </column-definition>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   170
 * </metadata>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   171
 * }</PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
 * Having detailed how the properties and metadata are described, the following details
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   173
 * how the contents of a {@code WebRowSet} object is described in XML. Note, that
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   174
 * this describes a {@code WebRowSet} object that has not undergone any
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
 * modifications since its instantiation.
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   176
 * A {@code currentRow} tag is mapped to each row of the table structure that the
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   177
 * {@code WebRowSet} object provides. A {@code columnValue} tag may contain
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   178
 * either the {@code stringData} or {@code binaryData} tag, according to
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
 * the SQL type that
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   180
 * the XML value is mapping back to. The {@code binaryData} tag contains data in the
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   181
 * Base64 encoding and is typically used for {@code BLOB} and {@code CLOB} type data.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   183
 * {@code
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   184
 * <data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   185
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   186
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
 *                      firstrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   188
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   189
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 *                      1
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   191
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   192
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   193
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   194
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
 *                      secondrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   196
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   197
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
 *                      2
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   199
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   200
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   201
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   202
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
 *                      thirdrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   204
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   205
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
 *                      3
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   207
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   208
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   209
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   210
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
 *                      fourthrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   212
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   213
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
 *                      4
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   215
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   216
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   217
 * </data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   218
 * }</PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
 * <h4>2.2 State 2 - Deleting a Row</h4>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   220
 * Deleting a row in a {@code WebRowSet} object involves simply moving to the row
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   221
 * to be deleted and then calling the method {@code deleteRow}, as in any other
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   222
 * {@code RowSet} object.  The following
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   223
 * two lines of code, in which <i>wrs</i> is a {@code WebRowSet} object, delete
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
 * the third row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
 * <PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 *     wrs.absolute(3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
 *     wrs.deleteRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 * </PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   229
 * The XML description shows the third row is marked as a {@code deleteRow},
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   230
 *  which eliminates the third row in the {@code WebRowSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   232
 * {@code
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   233
 * <data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   234
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   235
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
 *                      firstrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   237
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   238
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
 *                      1
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   240
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   241
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   242
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   243
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
 *                      secondrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   245
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   246
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
 *                      2
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   248
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   249
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   250
 *      <deleteRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   251
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
 *                      thirdrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   253
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   254
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
 *                      3
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   256
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   257
 *      </deleteRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   258
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   259
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
 *                      fourthrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   261
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   262
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
 *                      4
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   264
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   265
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   266
 * </data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   267
 *} </PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
 * <h4>2.3 State 3 - Inserting a Row</h4>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   269
 * A {@code WebRowSet} object can insert a new row by moving to the insert row,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
 * calling the appropriate updater methods for each column in the row, and then
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   271
 * calling the method {@code insertRow}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   273
 * {@code
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
 * wrs.moveToInsertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
 * wrs.updateString(1, "fifththrow");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
 * wrs.updateString(2, "5");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
 * wrs.insertRow();
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   278
 * }</PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
 * The following code fragment changes the second column value in the row just inserted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
 * Note that this code applies when new rows are inserted right after the current row,
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   281
 * which is why the method {@code next} moves the cursor to the correct row.
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   282
 * Calling the method {@code acceptChanges} writes the change to the data source.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   285
 * {@code wrs.moveToCurrentRow();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
 * wrs.next();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
 * wrs.updateString(2, "V");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
 * wrs.acceptChanges();
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   289
 * }</PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
 * Describing this in XML demonstrates where the Java code inserts a new row and then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
 * performs an update on the newly inserted row on an individual field.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   293
 * {@code
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   294
 * <data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   295
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   296
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
 *                      firstrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   298
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   299
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
 *                      1
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   301
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   302
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   303
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   304
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
 *                      secondrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   306
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   307
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
 *                      2
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   309
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   310
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   311
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   312
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
 *                      newthirdrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   314
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   315
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
 *                      III
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   317
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   318
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   319
 *      <insertRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   320
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
 *                      fifthrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   322
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   323
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
 *                      5
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   325
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   326
 *              <updateValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
 *                      V
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   328
 *              </updateValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   329
 *      </insertRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   330
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   331
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
 *                      fourthrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   333
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   334
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
 *                      4
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   336
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   337
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   338
 * </date>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   339
 *} </PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
 * <h4>2.4 State 4 - Modifying a Row</h4>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
 * Modifying a row produces specific XML that records both the new value and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
 * value that was replaced.  The value that was replaced becomes the original value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
 * and the new value becomes the current value. The following
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
 * code moves the cursor to a specific row, performs some modifications, and updates
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
 * the row when complete.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   347
 *{@code
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
 * wrs.absolute(5);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
 * wrs.updateString(1, "new4thRow");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
 * wrs.updateString(2, "IV");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
 * wrs.updateRow();
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   352
 * }</PRE>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   353
 * In XML, this is described by the {@code modifyRow} tag. Both the original and new
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
 * values are contained within the tag for original row tracking purposes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
 * <PRE>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   356
 * {@code
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   357
 * <data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   358
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   359
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
 *                      firstrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   361
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   362
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
 *                      1
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   364
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   365
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   366
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   367
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
 *                      secondrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   369
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   370
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
 *                      2
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   372
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   373
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   374
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   375
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
 *                      newthirdrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   377
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   378
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
 *                      III
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   380
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   381
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   382
 *      <currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   383
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
 *                      fifthrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   385
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   386
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
 *                      5
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   388
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   389
 *      </currentRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   390
 *      <modifyRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   391
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
 *                      fourthrow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   393
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   394
 *              <updateValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
 *                      new4thRow
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   396
 *              </updateValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   397
 *              <columnValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
 *                      4
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   399
 *              </columnValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   400
 *              <updateValue>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
 *                      IV
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   402
 *              </updateValue>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   403
 *      </modifyRow>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   404
 * </data>
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   405
 * }</PRE>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
 * @see javax.sql.rowset.JdbcRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
 * @see javax.sql.rowset.CachedRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
 * @see javax.sql.rowset.FilteredRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
 * @see javax.sql.rowset.JoinRowSet
24968
3308660aa3f2 8046389: Add missing @since tag under javax.sql.**
henryjen
parents: 20880
diff changeset
   411
 * @since 1.5
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
public interface WebRowSet extends CachedRowSet {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
   /**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   417
    * Reads a {@code WebRowSet} object in its XML format from the given
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   418
    * {@code Reader} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   420
    * @param reader the {@code java.io.Reader} stream from which this
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   421
    *        {@code WebRowSet} object will be populated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
    * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
    public void readXml(java.io.Reader reader) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
    /**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   428
     * Reads a stream based XML input to populate this {@code WebRowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
     *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   431
     * @param iStream the {@code java.io.InputStream} from which this
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   432
     *        {@code WebRowSet} object will be populated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
     * @throws SQLException if a data source access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
     * @throws IOException if an IO exception occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
    public void readXml(java.io.InputStream iStream) throws SQLException, IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
   /**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   439
    * Populates this {@code WebRowSet} object with
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   440
    * the contents of the given {@code ResultSet} object and writes its
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
    * data, properties, and metadata
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   442
    * to the given {@code Writer} object in XML format.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
    * <p>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   444
    * NOTE: The {@code WebRowSet} cursor may be moved to write out the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
    * contents to the XML data source. If implemented in this way, the cursor <b>must</b>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   446
    * be returned to its position just prior to the {@code writeXml()} call.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
    *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   448
    * @param rs the {@code ResultSet} object with which to populate this
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   449
    *        {@code WebRowSet} object
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   450
    * @param writer the {@code java.io.Writer} object to write to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
    * @throws SQLException if an error occurs writing out the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
    *          contents in XML format
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
    public void writeXml(ResultSet rs, java.io.Writer writer) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
   /**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   457
    * Populates this {@code WebRowSet} object with
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   458
    * the contents of the given {@code ResultSet} object and writes its
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
    * data, properties, and metadata
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   460
    * to the given {@code OutputStream} object in XML format.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
    * <p>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   462
    * NOTE: The {@code WebRowSet} cursor may be moved to write out the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
    * contents to the XML data source. If implemented in this way, the cursor <b>must</b>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   464
    * be returned to its position just prior to the {@code writeXml()} call.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   466
    * @param rs the {@code ResultSet} object with which to populate this
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   467
    *        {@code WebRowSet} object
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   468
    * @param oStream the {@code java.io.OutputStream} to write to
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
    * @throws SQLException if a data source access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
    * @throws IOException if a IO exception occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
    public void writeXml(ResultSet rs, java.io.OutputStream oStream) throws SQLException, IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
   /**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   475
    * Writes the data, properties, and metadata for this {@code WebRowSet} object
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   476
    * to the given {@code Writer} object in XML format.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
    *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   478
    * @param writer the {@code java.io.Writer} stream to write to
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
    * @throws SQLException if an error occurs writing out the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
    *          contents to XML
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    public void writeXml(java.io.Writer writer) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
    /**
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   485
     * Writes the data, properties, and metadata for this {@code WebRowSet} object
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   486
     * to the given {@code OutputStream} object in XML format.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
     *
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   488
     * @param oStream the {@code java.io.OutputStream} stream to write to
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
     * @throws SQLException if a data source access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
     * @throws IOException if a IO exception occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
    public void writeXml(java.io.OutputStream oStream) throws SQLException, IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
     * The public identifier for the XML Schema definition that defines the XML
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   496
     * tags and their valid values for a {@code WebRowSet} implementation.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
    public static String PUBLIC_XML_SCHEMA =
6671
c5fbc05d7347 6984044: RowSet source needs to rebrand vendor references
lancea
parents: 5506
diff changeset
   499
        "--//Oracle Corporation//XSD Schema//EN";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     * The URL for the XML Schema definition file that defines the XML tags and
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 6671
diff changeset
   503
     * their valid values for a {@code WebRowSet} implementation.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    public static String SCHEMA_SYSTEM_ID = "http://java.sun.com/xml/ns/jdbc/webrowset.xsd";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
}