JDK 11 java.sql.rowset.jmod - SQL Rowset Module

JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module.

JDK 11 SQL Rowset module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.sql.rowset.jmod.

JDK 11 SQL Rowset module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 SQL Rowset module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.sql.rowset.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

com/sun/rowset/providers/RIXMLProvider.java

/*
 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package com.sun.rowset.providers;

import com.sun.rowset.JdbcRowSetResourceBundle;
import java.io.IOException;
import java.sql.*;
import javax.sql.*;

import javax.sql.rowset.spi.*;

/**
 * A reference implementation of a JDBC RowSet synchronization provider
 * with the ability to read and write rowsets in well formed XML using the
 * standard WebRowSet schema.
 *
 * <h3>1.0 Background</h3>
 * This synchronization provider is registered with the
 * <code>SyncFactory</code> by default as the
 * <code>com.sun.rowset.providers.RIXMLProvider</code>.
 * <P>
 * A <code>WebRowSet</code> object uses an <code>RIXMLProvider</code> implementation
 * to read an XML data source or to write itself in XML format using the
 * <code>WebRowSet</code> XML schema definition available at
 * <pre>
 *     <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">http://java.sun.com/xml/ns/jdbc/webrowset.xsd</a>
 * </pre>
 * The <code>RIXMLProvider</code> implementation has a synchronization level of
 * GRADE_NONE, which means that it does no checking at all for conflicts.  It
 * simply writes a <code>WebRowSet</code> object to a file.
 * <h3>2.0 Usage</h3>
 * A <code>WebRowSet</code> implementation is created with an <code>RIXMLProvider</code>
 * by default.
 * <pre>
 *     WebRowSet wrs = new FooWebRowSetImpl();
 * </pre>
 * The <code>SyncFactory</code> always provides an instance of
 * <code>RIOptimisticProvider</code> when no provider is specified,
 * but the implementation of the default constructor for <code>WebRowSet</code> sets the
 * provider to be the <code>RIXMLProvider</code> implementation.  Therefore,
 * the following line of code is executed behind the scenes as part of the
 * implementation of the default constructor.
 * <pre>
 *     wrs.setSyncProvider("com.sun.rowset.providers.RIXMLProvider");
 * </pre>
 * See the standard <code>RowSet</code> reference implementations in the
 * <code>com.sun.rowset</code> package for more details.
 *
 * @author  Jonathan Bruce
 * @see javax.sql.rowset.spi.SyncProvider
 * @see javax.sql.rowset.spi.SyncProviderException
 * @see javax.sql.rowset.spi.SyncFactory
 * @see javax.sql.rowset.spi.SyncFactoryException
 */
public final class RIXMLProvider extends SyncProvider {

    /**
     * The unique provider identifier.
     */
    private String providerID = "com.sun.rowset.providers.RIXMLProvider";

    /**
     * The vendor name of this SyncProvider implementation.
     */
    private String vendorName = "Oracle Corporation";

    /**
     * The version number of this SyncProvider implementation.
     */
    private String versionNumber = "1.0";

    private JdbcRowSetResourceBundle resBundle;

    private XmlReader xmlReader;
    private XmlWriter xmlWriter;

    /**
     * This provider is available to all JDBC <code>RowSet</code> implementations as the
     * default persistence provider.
     */
    public RIXMLProvider() {
        providerID = this.getClass().getName();
        try {
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
        } catch(IOException ioe) {
            throw new RuntimeException(ioe);
        }
    }

    /**
     * Returns <code>"javax.sql.rowset.providers.RIXMLProvider"</code>, which is
     * the fully qualified class name of this provider implementation.
     *
     * @return a <code>String</code> object with the fully specified class name of
     *           this <code>RIOptimisticProvider</code> implementation
     */
    public String getProviderID() {
        return providerID;
    }

    // additional methods that sit on top of reader/writer methods back to
    // original datasource. Allow XML state to be written out and in

    /**
     * Sets this <code>WebRowSet</code> object's reader to the given
     * <code>XmlReader</code> object.
     *
     * @throws SQLException if a database access error occurs
     */
    public void setXmlReader(XmlReader reader) throws SQLException {
        xmlReader = reader;
    }

    /**
     * Sets this <code>WebRowSet</code> object's writer to the given
     * <code>XmlWriter</code> object.
     *
     * @throws SQLException if a database access error occurs
     */
    public void setXmlWriter(XmlWriter writer) throws SQLException {
        xmlWriter = writer;
    }

    /**
     * Retrieves the reader that this <code>WebRowSet</code> object
     * will call when its <code>readXml</code> method is called.
     *
     * @return the <code>XmlReader</code> object for this SyncProvider
     * @throws SQLException if a database access error occurs
     */
    public XmlReader getXmlReader() throws SQLException {
        return xmlReader;
    }

    /**
     * Retrieves the writer that this <code>WebRowSet</code> object
     * will call when its <code>writeXml</code> method is called.
     *
     * @return the <code>XmlWriter</code> for this SyncProvider
     * @throws SQLException if a database access error occurs
     */
    public XmlWriter getXmlWriter() throws SQLException {
        return xmlWriter;
    }

    /**
     * Returns the <code>SyncProvider</code> grade of syncrhonization that
     * <code>RowSet</code> object instances can expect when using this
     * implementation. As this implementation provides no synchonization
     * facilities to the XML data source, the lowest grade is returned.
     *
     * @return the <code>SyncProvider</code> syncronization grade of this
     *     provider; must be one of the following constants:
     *       <PRE>
     *          SyncProvider.GRADE_NONE,
     *          SyncProvider.GRADE_MODIFIED_AT_COMMIT,
     *          SyncProvider.GRADE_CHECK_ALL_AT_COMMIT,
     *          SyncProvider.GRADE_LOCK_WHEN_MODIFIED,
     *          SyncProvider.GRADE_LOCK_WHEN_LOADED
     *       </PRE>
     *
     */
    public int getProviderGrade() {
        return SyncProvider.GRADE_NONE;
    }

    /**
     * Returns the default UPDATABLE_VIEW behavior of this reader
     *
     */
    public int supportsUpdatableView() {
        return SyncProvider.NONUPDATABLE_VIEW_SYNC;
    }

    /**
     * Returns the default DATASOURCE_LOCK behavior of this reader
     */
    public int getDataSourceLock() throws SyncProviderException {
        return SyncProvider.DATASOURCE_NO_LOCK;
    }

    /**
     * Throws an unsupported operation exception as this method does
     * function with non-locking XML data sources.
     */
    public void setDataSourceLock(int lock) throws SyncProviderException {
        throw new UnsupportedOperationException(resBundle.handleGetObject("rixml.unsupp").toString());
    }

    /**
     * Returns a null object as RowSetWriters are not returned by this SyncProvider
     */
    public RowSetWriter getRowSetWriter() {
        return null;
    }

    /**
     * Returns a null object as RowSetWriter objects are not returned by this
     * SyncProvider
     */
    public RowSetReader getRowSetReader() {
        return null;
    }

  /**
     * Returns the release version ID of the Reference Implementation Optimistic
     * Synchronization Provider.
     *
     * @return the <code>String</code> detailing the version number of this SyncProvider
     */
    public String getVersion() {
        return this.versionNumber;
    }

    /**
     * Returns the vendor name of the Reference Implemntation Optimistic
     * Syncchronication Provider
     *
     * @return the <code>String</code> detailing the vendor name of this
     *      SyncProvider
     */
    public String getVendor() {
        return this.vendorName;
    }
}

com/sun/rowset/providers/RIXMLProvider.java

 

JDK 11 java.transaction.xa.jmod - Transaction XA Module

JDK 11 java.sql.jmod - SQL Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-08-25, 7938👍, 0💬