2802N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A reference implementation of a JDBC RowSet synchronization provider 0N/A * with the ability to read and write rowsets in well formed XML using the 0N/A * standard WebRowSet schema. 0N/A * <h3>1.0 Background</h3> 0N/A * This synchronization provider is registered with the 0N/A * <code>SyncFactory</code> by default as the 0N/A * <code>com.sun.rowset.providers.RIXMLProvider</code>. 0N/A * A <code>WebRowSet</code> object uses an <code>RIXMLProvider</code> implementation 0N/A * to read an XML data source or to write itself in XML format using the 0N/A * <code>WebRowSet</code> XML schema definition available at 0N/A * The <code>RIXMLProvider</code> implementation has a synchronization level of 0N/A * GRADE_NONE, which means that it does no checking at all for conflicts. It 0N/A * simply writes a <code>WebRowSet</code> object to a file. 0N/A * <h3>2.0 Usage</h3> 0N/A * A <code>WebRowSet</code> implementation is created with an <code>RIXMLProvider</code> 0N/A * WebRowSet wrs = new FooWebRowSetImpl(); 0N/A * The <code>SyncFactory</code> always provides an instance of 0N/A * <code>RIOptimisticProvider</code> when no provider is specified, 0N/A * but the implementation of the default constructor for <code>WebRowSet</code> sets the 0N/A * provider to be the <code>RIXMLProvider</code> implementation. Therefore, 0N/A * the following line of code is executed behind the scenes as part of the 0N/A * implementation of the default constructor. 0N/A * wrs.setSyncProvider("com.sun.rowset.providers.RIXMLProvider"); 0N/A * See the standard <code>RowSet</code> reference implementations in the 0N/A * <code>com.sun.rowset</code> package for more details. 0N/A * @author Jonathan Bruce 0N/A * @see javax.sql.rowset.spi.SyncProvider 0N/A * @see javax.sql.rowset.spi.SyncProviderException 0N/A * @see javax.sql.rowset.spi.SyncFactory 0N/A * @see javax.sql.rowset.spi.SyncFactoryException 0N/A * The unique provider identifier. 0N/A * The vendor name of this SyncProvider implementation. 0N/A * The version number of this SyncProvider implementation. 0N/A * This provider is available to all JDBC <code>RowSet</code> implementations as the 0N/A * default persistence provider. 0N/A * Returns <code>"javax.sql.rowset.providers.RIXMLProvider"</code>, which is 0N/A * the fully qualified class name of this provider implementation. 0N/A * @return a <code>String</code> object with the fully specified class name of 0N/A * this <code>RIOptimisticProvider</code> implementation 0N/A // original datasource. Allow XML state to be written out and in 0N/A * Sets this <code>WebRowSet</code> object's reader to the given 0N/A * <code>XmlReader</code> object. 0N/A * @throws SQLException if a database access error occurs 0N/A * Sets this <code>WebRowSet</code> object's writer to the given 0N/A * <code>XmlWriter</code> object. 0N/A * @throws SQLException if a database access error occurs 0N/A * Retrieves the reader that this <code>WebRowSet</code> object 0N/A * will call when its <code>readXml</code> method is called. 0N/A * @return the <code>XmlReader</code> object for this SyncProvider 0N/A * @throws SQLException if a database access error occurs 0N/A * Retrieves the writer that this <code>WebRowSet</code> object 0N/A * will call when its <code>writeXml</code> method is called. 0N/A * @return the <code>XmlWriter</code> for this SyncProvider 0N/A * @throws SQLException if a database access error occurs 0N/A * Returns the <code>SyncProvider</code> grade of syncrhonization that 0N/A * <code>RowSet</code> object instances can expect when using this 0N/A * implementation. As this implementation provides no synchonization 0N/A * facilities to the XML data source, the lowest grade is returned. 0N/A * @return the <code>SyncProvider</code> syncronization grade of this 0N/A * provider; must be one of the following constants: 0N/A * SyncProvider.GRADE_NONE, 0N/A * SyncProvider.GRADE_MODIFIED_AT_COMMIT, 0N/A * SyncProvider.GRADE_CHECK_ALL_AT_COMMIT, 0N/A * SyncProvider.GRADE_LOCK_WHEN_MODIFIED, 0N/A * SyncProvider.GRADE_LOCK_WHEN_LOADED 0N/A * Returns the default UPDATABLE_VIEW behavior of this reader 0N/A * Returns the default DATASOURCE_LOCK behavior of this reader 0N/A * Throws an unsupported operation exception as this method does 0N/A * function with non-locking XML data sources. 0N/A * Returns a null object as RowSetWriters are not returned by this SyncProvider 0N/A * Returns a null object as RowSetWriter objects are not returned by this 0N/A * Returns the release version ID of the Reference Implementation Optimistic 0N/A * Synchronization Provider. 0N/A * @return the <code>String</code> detailing the version number of this SyncProvider 0N/A * Returns the vendor name of the Reference Implemntation Optimistic 0N/A * Syncchronication Provider 0N/A * @return the <code>String</code> detailing the vendor name of this