public final class

RIXMLProvider

extends SyncProvider
java.lang.Object
   ↳ javax.sql.rowset.spi.SyncProvider
     ↳ com.sun.rowset.providers.RIXMLProvider

Class Overview

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.

1.0 Background

This synchronization provider is registered with the SyncFactory by default as the com.sun.rowset.providers.RIXMLProvider.

A WebRowSet object uses an RIXMLProvider implementation to read an XML data source or to write itself in XML format using the WebRowSet XML schema definition available at

     http://java.sun.com/xml/ns/jdbc/webrowset.xsd
 
The RIXMLProvider implementation has a synchronization level of GRADE_NONE, which means that it does no checking at all for conflicts. It simply writes a WebRowSet object to a file.

2.0 Usage

A WebRowSet implementation is created with an RIXMLProvider by default.
     WebRowSet wrs = new FooWebRowSetImpl();
 
The SyncFactory always provides an instance of RIOptimisticProvider when no provider is specified, but the implementation of the default constructor for WebRowSet sets the provider to be the RIXMLProvider implementation. Therefore, the following line of code is executed behind the scenes as part of the implementation of the default constructor.
     wrs.setSyncProvider("com.sun.rowset.providers.RIXMLProvider");
 
See the standard RowSet reference implementations in the com.sun.rowset package for more details.

Summary

[Expand]
Inherited Fields
From class javax.sql.rowset.spi.SyncProvider
Public Constructors
RIXMLProvider()
This provider is available to all JDBC RowSet implementations as the default persistence provider.
Public Methods
int getDataSourceLock()
Returns the default DATASOURCE_LOCK behavior of this reader
int getProviderGrade()
Returns the SyncProvider grade of syncrhonization that RowSet object instances can expect when using this implementation.
String getProviderID()
Returns "javax.sql.rowset.providers.RIXMLProvider", which is the fully qualified class name of this provider implementation.
RowSetReader getRowSetReader()
Returns a null object as RowSetWriter objects are not returned by this SyncProvider
RowSetWriter getRowSetWriter()
Returns a null object as RowSetWriters are not returned by this SyncProvider
String getVendor()
Returns the vendor name of the Reference Implemntation Optimistic Syncchronication Provider
String getVersion()
Returns the release version ID of the Reference Implementation Optimistic Synchronization Provider.
XmlReader getXmlReader()
Retrieves the reader that this WebRowSet object will call when its readXml method is called.
XmlWriter getXmlWriter()
Retrieves the writer that this WebRowSet object will call when its writeXml method is called.
void setDataSourceLock(int lock)
Throws an unsupported operation exception as this method does function with non-locking XML data sources.
void setXmlReader(XmlReader reader)
Sets this WebRowSet object's reader to the given XmlReader object.
void setXmlWriter(XmlWriter writer)
Sets this WebRowSet object's writer to the given XmlWriter object.
int supportsUpdatableView()
Returns the default UPDATABLE_VIEW behavior of this reader
[Expand]
Inherited Methods
From class javax.sql.rowset.spi.SyncProvider
From class java.lang.Object

Public Constructors

public RIXMLProvider ()

This provider is available to all JDBC RowSet implementations as the default persistence provider.

Public Methods

public int getDataSourceLock ()

Returns the default DATASOURCE_LOCK behavior of this reader

Returns
  • a constant indicating the current level of data source lock active in this SyncProvider object; one of the following:
               SyncProvider.DATASOURCE_NO_LOCK,
               SyncProvider.DATASOURCE_ROW_LOCK,
               SyncProvider.DATASOURCE_TABLE_LOCK,
               SyncProvider.DATASOURCE_DB_LOCK
     

public int getProviderGrade ()

Returns the SyncProvider grade of syncrhonization that RowSet 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.

Returns
  • the SyncProvider syncronization grade of this provider; must be one of the following constants:
              SyncProvider.GRADE_NONE,
              SyncProvider.GRADE_MODIFIED_AT_COMMIT,
              SyncProvider.GRADE_CHECK_ALL_AT_COMMIT,
              SyncProvider.GRADE_LOCK_WHEN_MODIFIED,
              SyncProvider.GRADE_LOCK_WHEN_LOADED
           

public String getProviderID ()

Returns "javax.sql.rowset.providers.RIXMLProvider", which is the fully qualified class name of this provider implementation.

Returns
  • a String object with the fully specified class name of this RIOptimisticProvider implementation

public RowSetReader getRowSetReader ()

Returns a null object as RowSetWriter objects are not returned by this SyncProvider

Returns
  • a javax.sql.RowSetReader object

public RowSetWriter getRowSetWriter ()

Returns a null object as RowSetWriters are not returned by this SyncProvider

Returns
  • a javax.sql.RowSetWriter object

public String getVendor ()

Returns the vendor name of the Reference Implemntation Optimistic Syncchronication Provider

Returns
  • the String detailing the vendor name of this SyncProvider

public String getVersion ()

Returns the release version ID of the Reference Implementation Optimistic Synchronization Provider.

Returns
  • the String detailing the version number of this SyncProvider

public XmlReader getXmlReader ()

Retrieves the reader that this WebRowSet object will call when its readXml method is called.

Returns
  • the XmlReader object for this SyncProvider
Throws
SQLException if a database access error occurs

public XmlWriter getXmlWriter ()

Retrieves the writer that this WebRowSet object will call when its writeXml method is called.

Returns
  • the XmlWriter for this SyncProvider
Throws
SQLException if a database access error occurs

public void setDataSourceLock (int lock)

Throws an unsupported operation exception as this method does function with non-locking XML data sources.

Parameters
lock one of the following constants indicating the severity level of data source lock required:
           SyncProvider.DATASOURCE_NO_LOCK,
           SyncProvider.DATASOURCE_ROW_LOCK,
           SyncProvider.DATASOURCE_TABLE_LOCK,
           SyncProvider.DATASOURCE_DB_LOCK,
 

public void setXmlReader (XmlReader reader)

Sets this WebRowSet object's reader to the given XmlReader object.

Throws
SQLException if a database access error occurs

public void setXmlWriter (XmlWriter writer)

Sets this WebRowSet object's writer to the given XmlWriter object.

Throws
SQLException if a database access error occurs

public int supportsUpdatableView ()

Returns the default UPDATABLE_VIEW behavior of this reader

Returns
  • an int saying whether this SyncProvider object supports updating an SQL VIEW; one of the following: SyncProvider.UPDATABLE_VIEW_SYNC, SyncProvider.NONUPDATABLE_VIEW_SYNC