src/share/classes/javax/sql/rowset/WebRowSet.java

Print this page


   1 /*
   2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  35 /**
  36  * The standard interface that all implementations of a {@code WebRowSet}
  37  * must implement.
  38  *
  39  * <h3>1.0 Overview</h3>
  40  * The {@code WebRowSetImpl} provides the standard
  41  * reference implementation, which may be extended if required.
  42  * <P>
  43  * The standard WebRowSet XML Schema definition is available at the following
  44  * URI:
  45  * <ul>
  46  * <li>
  47  * <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
  48  * </li>
  49  * </ul>
  50  * It describes the standard XML document format required when describing a
  51  * {@code RowSet} object in XML and must be used be all standard implementations
  52  * of the {@code WebRowSet} interface to ensure interoperability. In addition,
  53  * the {@code WebRowSet} schema uses specific SQL/XML Schema annotations,
  54  * thus ensuring greater cross
  55  * platform inter-operability. This is an effort currently under way at the ISO
  56  * organization. The SQL/XML definition is available at the following URI:
  57  * <ul>
  58  * <li>
  59  * <a href="http://standards.iso.org/iso/9075/2002/12/sqlxml">http://standards.iso.org/iso/9075/2002/12/sqlxml</a>
  60  * </li>
  61  * </ul>
  62  * The schema definition describes the internal data of a {@code RowSet} object
  63  * in three distinct areas:
  64  * <UL>
  65  * <li>properties - These properties describe the standard synchronization
  66  * provider properties in addition to the more general {@code RowSet} properties.
  67  * </li>
  68  * <li>metadata - This describes the metadata associated with the tabular structure governed by a
  69  * {@code WebRowSet} object. The metadata described is closely aligned with the
  70  * metadata accessible in the underlying {@code java.sql.ResultSet} interface.
  71  * </li>
  72  * <li>data - This describes the original data (the state of data since the
  73  * last population
  74  * or last synchronization of the {@code WebRowSet} object) and the current
  75  * data. By keeping track of the delta between the original data and the current data,


  92  * the {@code CachedRowSet}&trade; interface
  93  * provide key details that describe WebRowSet
  94  * properties. Outputting the WebRowSet object to XML using the standard
  95  * {@code writeXml} methods describes the internal properties as follows:
  96  * <PRE>
  97  * {@code
  98  * <properties>
  99  *       <command>select co1, col2 from test_table</command>
 100  *      <concurrency>1</concurrency>
 101  *      <datasource/>
 102  *      <escape-processing>true</escape-processing>
 103  *      <fetch-direction>0</fetch-direction>
 104  *      <fetch-size>0</fetch-size>
 105  *      <isolation-level>1</isolation-level>
 106  *      <key-columns/>
 107  *      <map/>
 108  *      <max-field-size>0</max-field-size>
 109  *      <max-rows>0</max-rows>
 110  *      <query-timeout>0</query-timeout>
 111  *      <read-only>false</read-only>
 112  *      <rowset-type>TRANSACTION_READ_UNCOMMITED</rowset-type>
 113  *      <show-deleted>false</show-deleted>
 114  *      <table-name/>
 115  *      <url>jdbc:thin:oracle</url>
 116  *      <sync-provider>
 117  *              <sync-provider-name>.com.rowset.provider.RIOptimisticProvider</sync-provider-name>
 118  *              <sync-provider-vendor>Oracle Corporation</sync-provider-vendor>
 119  *              <sync-provider-version>1.0</sync-provider-name>
 120  *              <sync-provider-grade>LOW</sync-provider-grade>
 121  *              <data-source-lock>NONE</data-source-lock>
 122  *      </sync-provider>
 123  * </properties>
 124  * } </PRE>
 125  * The meta-data describing the make up of the WebRowSet is described
 126  * in XML as detailed below. Note both columns are described between the
 127  * {@code column-definition} tags.
 128  * <PRE>
 129  * {@code
 130  * <metadata>
 131  *      <column-count>2</column-count>
 132  *      <column-definition>


   1 /*
   2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  35 /**
  36  * The standard interface that all implementations of a {@code WebRowSet}
  37  * must implement.
  38  *
  39  * <h3>1.0 Overview</h3>
  40  * The {@code WebRowSetImpl} provides the standard
  41  * reference implementation, which may be extended if required.
  42  * <P>
  43  * The standard WebRowSet XML Schema definition is available at the following
  44  * URI:
  45  * <ul>
  46  * <li>
  47  * <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
  48  * </li>
  49  * </ul>
  50  * It describes the standard XML document format required when describing a
  51  * {@code RowSet} object in XML and must be used be all standard implementations
  52  * of the {@code WebRowSet} interface to ensure interoperability. In addition,
  53  * the {@code WebRowSet} schema uses specific SQL/XML Schema annotations,
  54  * thus ensuring greater cross
  55  * platform interoperability. This is an effort currently under way at the ISO
  56  * organization. The SQL/XML definition is available at the following URI:
  57  * <ul>
  58  * <li>
  59  * <a href="http://standards.iso.org/iso/9075/2002/12/sqlxml">http://standards.iso.org/iso/9075/2002/12/sqlxml</a>
  60  * </li>
  61  * </ul>
  62  * The schema definition describes the internal data of a {@code RowSet} object
  63  * in three distinct areas:
  64  * <UL>
  65  * <li>properties - These properties describe the standard synchronization
  66  * provider properties in addition to the more general {@code RowSet} properties.
  67  * </li>
  68  * <li>metadata - This describes the metadata associated with the tabular structure governed by a
  69  * {@code WebRowSet} object. The metadata described is closely aligned with the
  70  * metadata accessible in the underlying {@code java.sql.ResultSet} interface.
  71  * </li>
  72  * <li>data - This describes the original data (the state of data since the
  73  * last population
  74  * or last synchronization of the {@code WebRowSet} object) and the current
  75  * data. By keeping track of the delta between the original data and the current data,


  92  * the {@code CachedRowSet}&trade; interface
  93  * provide key details that describe WebRowSet
  94  * properties. Outputting the WebRowSet object to XML using the standard
  95  * {@code writeXml} methods describes the internal properties as follows:
  96  * <PRE>
  97  * {@code
  98  * <properties>
  99  *       <command>select co1, col2 from test_table</command>
 100  *      <concurrency>1</concurrency>
 101  *      <datasource/>
 102  *      <escape-processing>true</escape-processing>
 103  *      <fetch-direction>0</fetch-direction>
 104  *      <fetch-size>0</fetch-size>
 105  *      <isolation-level>1</isolation-level>
 106  *      <key-columns/>
 107  *      <map/>
 108  *      <max-field-size>0</max-field-size>
 109  *      <max-rows>0</max-rows>
 110  *      <query-timeout>0</query-timeout>
 111  *      <read-only>false</read-only>
 112  *      <rowset-type>TRANSACTION_READ_UNCOMMITTED</rowset-type>
 113  *      <show-deleted>false</show-deleted>
 114  *      <table-name/>
 115  *      <url>jdbc:thin:oracle</url>
 116  *      <sync-provider>
 117  *              <sync-provider-name>.com.rowset.provider.RIOptimisticProvider</sync-provider-name>
 118  *              <sync-provider-vendor>Oracle Corporation</sync-provider-vendor>
 119  *              <sync-provider-version>1.0</sync-provider-name>
 120  *              <sync-provider-grade>LOW</sync-provider-grade>
 121  *              <data-source-lock>NONE</data-source-lock>
 122  *      </sync-provider>
 123  * </properties>
 124  * } </PRE>
 125  * The meta-data describing the make up of the WebRowSet is described
 126  * in XML as detailed below. Note both columns are described between the
 127  * {@code column-definition} tags.
 128  * <PRE>
 129  * {@code
 130  * <metadata>
 131  *      <column-count>2</column-count>
 132  *      <column-definition>