2741N/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 * The standard implementation of the <code>WebRowSet</code> interface. See the interface 0N/A * defintion for full behaviour and implementation requirements. 0N/A * @author Jonathan Bruce, Amit Handa 0N/A * The <code>WebRowSetXmlReader</code> object that this 0N/A * <code>WebRowSet</code> object will call when the method 0N/A * <code>WebRowSet.readXml</code> is invoked. 0N/A * The <code>WebRowSetXmlWriter</code> object that this 0N/A * <code>WebRowSet</code> object will call when the method 0N/A * <code>WebRowSet.writeXml</code> is invoked. 0N/A /* This stores the cursor position prior to calling the writeXML. 0N/A * This variable is used after the write to restore the position 0N/A * to the point where the writeXml was called. 0N/A * Constructs a new <code>WebRowSet</code> object initialized with the 0N/A * default values for a <code>CachedRowSet</code> object instance. This 0N/A * provides the <code>RIOptimistic</code> provider to deliver 0N/A * synchronization capabilities to relational datastores and a default 0N/A * <code>WebRowSetXmlReader</code> object and a default 0N/A * <code>WebRowSetXmlWriter</code> object to enable XML output 0N/A * @throws SQLException if an error occurs in configuring the default 0N/A * synchronization providers for relational and XML providers. 0N/A // Needs to use to SPI XmlReader,XmlWriters 0N/A * Constructs a new <code>WebRowSet</code> object initialized with the the 0N/A * synchronization SPI provider properties as specified in the <code>Hashtable</code>. If 0N/A * this hashtable is empty or is <code>null</code> the default constructor is invoked. 0N/A * @throws SQLException if an error occurs in configuring the specified 0N/A * synchronization providers for the relational and XML providers; or 0N/A * if the Hashtanle is null 0N/A // set the Reader, this maybe overridden latter 0N/A // xmlReader = provider.getRowSetReader(); 0N/A // xmlWriter = provider.getRowSetWriter(); 0N/A * Populates this <code>WebRowSet</code> object with the 0N/A * data in the given <code>ResultSet</code> object and writes itself 0N/A * to the given <code>java.io.Writer</code> object in XML format. 0N/A * This includes the rowset's data, properties, and metadata. 0N/A * @throws SQLException if an error occurs writing out the rowset 0N/A // WebRowSetImpl wrs = new WebRowSetImpl(); 0N/A // Store the cursor position before writing 0N/A * Writes this <code>WebRowSet</code> object to the given 0N/A * <code>java.io.Writer</code> object in XML format. This 0N/A * includes the rowset's data, properties, and metadata. 0N/A * @throws SQLException if an error occurs writing out the rowset 0N/A // This will change to a XmlReader, which over-rides the default 0N/A // Xml that is used when a WRS is instantiated. 0N/A // WebRowSetXmlWriter xmlWriter = getXmlWriter(); 0N/A // Store the cursor position before writing 0N/A * Reads this <code>WebRowSet</code> object in its XML format. 0N/A * @throws SQLException if a database access error occurs 0N/A // This will change to a XmlReader, which over-rides the default 0N/A // Xml that is used when a WRS is instantiated. 0N/A //WebRowSetXmlReader xmlReader = getXmlReader(); 0N/A // Position is before the first row 0N/A // The cursor position is to be stored while serializng 0N/A // and deserializing the WebRowSet Object. 0N/A // Return the position back to place prior to callin writeXml 0N/A // Stream based methods 0N/A * Reads a stream based XML input to populate this <code>WebRowSet</code> 0N/A * @throws SQLException if a data source access error occurs 0N/A * @throws IOException if a IO exception occurs 0N/A // Position is before the first row 0N/A // The cursor position is to be stored while serializng 0N/A // and deserializing the WebRowSet Object. 0N/A // Return the position back to place prior to callin writeXml 0N/A * Writes this <code>WebRowSet</code> object to the given <code> OutputStream</code> 0N/A * object in XML format. 0N/A * Creates an an output stream of the internal state and contents of a 0N/A * <code>WebRowSet</code> for XML proceessing 0N/A * @throws SQLException if a datasource access error occurs 0N/A * @throws IOException if an IO exception occurs 0N/A // Store the cursor position before writing 0N/A * Populates this <code>WebRowSet</code> object with the 0N/A * data in the given <code>ResultSet</code> object and writes itself 0N/A * to the given <code>java.io.OutputStream</code> object in XML format. 0N/A * This includes the rowset's data, properties, and metadata. 0N/A * @throws SQLException if a datasource access error occurs 0N/A * @throws IOException if an IO exception occurs 0N/A // Store the cursor position before writing 2741N/A * This method re populates the resBundle 2741N/A * during the deserialization process 2741N/A // Default state initialization happens here 2741N/A // Initialization of transient Res Bundle happens here .