|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.sql.rowset.spi.SyncProvider
com.sun.rowset.providers.RIXMLProvider
public final class RIXMLProvider
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.
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.
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.
SyncProvider,
SyncProviderException,
SyncFactory,
SyncFactoryException| Field Summary |
|---|
| Fields inherited from class javax.sql.rowset.spi.SyncProvider |
|---|
DATASOURCE_DB_LOCK, DATASOURCE_NO_LOCK, DATASOURCE_ROW_LOCK, DATASOURCE_TABLE_LOCK, GRADE_CHECK_ALL_AT_COMMIT, GRADE_CHECK_MODIFIED_AT_COMMIT, GRADE_LOCK_WHEN_LOADED, GRADE_LOCK_WHEN_MODIFIED, GRADE_NONE, NONUPDATABLE_VIEW_SYNC, UPDATABLE_VIEW_SYNC |
| Constructor Summary | |
|---|---|
RIXMLProvider()
This provider is available to all JDBC RowSet implementations as the
default persistence provider. |
|
| Method Summary | |
|---|---|
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. |
java.lang.String |
getProviderID()
Returns "javax.sql.rowset.providers.RIXMLProvider", which is
the fully qualified class name of this provider implementation. |
javax.sql.RowSetReader |
getRowSetReader()
Returns a null object as RowSetWriter objects are not returned by this SyncProvider |
javax.sql.RowSetWriter |
getRowSetWriter()
Returns a null object as RowSetWriters are not returned by this SyncProvider |
java.lang.String |
getVendor()
Returns the vendor name of the Reference Implemntation Optimistic Syncchronication Provider |
java.lang.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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RIXMLProvider()
RowSet implementations as the
default persistence provider.
| Method Detail |
|---|
public java.lang.String getProviderID()
"javax.sql.rowset.providers.RIXMLProvider", which is
the fully qualified class name of this provider implementation.
getProviderID in class SyncProviderString object with the fully specified class name of
this RIOptimisticProvider implementation
public void setXmlReader(XmlReader reader)
throws java.sql.SQLException
WebRowSet object's reader to the given
XmlReader object.
java.sql.SQLException - if a database access error occurs
public void setXmlWriter(XmlWriter writer)
throws java.sql.SQLException
WebRowSet object's writer to the given
XmlWriter object.
java.sql.SQLException - if a database access error occurs
public XmlReader getXmlReader()
throws java.sql.SQLException
WebRowSet object
will call when its readXml method is called.
XmlReader object for this SyncProvider
java.sql.SQLException - if a database access error occurs
public XmlWriter getXmlWriter()
throws java.sql.SQLException
WebRowSet object
will call when its writeXml method is called.
XmlWriter for this SyncProvider
java.sql.SQLException - if a database access error occurspublic int getProviderGrade()
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.
getProviderGrade in class SyncProviderSyncProvider 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 int supportsUpdatableView()
supportsUpdatableView in class SyncProviderint saying whether this SyncProvider
object supports updating an SQL VIEW; one of the
following:
SyncProvider.UPDATABLE_VIEW_SYNC,
SyncProvider.NONUPDATABLE_VIEW_SYNC
public int getDataSourceLock()
throws SyncProviderException
getDataSourceLock in class SyncProviderSyncProvider object;
one of the following:
SyncProvider.DATASOURCE_NO_LOCK,
SyncProvider.DATASOURCE_ROW_LOCK,
SyncProvider.DATASOURCE_TABLE_LOCK,
SyncProvider.DATASOURCE_DB_LOCK
SyncProviderExceptionSyncProvider.setDataSourceLock(int)
public void setDataSourceLock(int lock)
throws SyncProviderException
setDataSourceLock in class SyncProviderlock - 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,
SyncProviderException - if an unsupported data source locking level
is set.SyncProvider.getDataSourceLock()public javax.sql.RowSetWriter getRowSetWriter()
getRowSetWriter in class SyncProviderjavax.sql.RowSetWriter objectpublic javax.sql.RowSetReader getRowSetReader()
getRowSetReader in class SyncProviderjavax.sql.RowSetReader objectpublic java.lang.String getVersion()
getVersion in class SyncProviderString detailing the version number of this SyncProviderpublic java.lang.String getVendor()
getVendor in class SyncProviderString detailing the vendor name of this
SyncProvider
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||