Spec-Zone .ru
спецификации, руководства, описания, API
Please note that the specifications and other information contained herein are not final and are subject to change. The information is being made available to you solely for purpose of evaluation.

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

javax.sql.rowset
Class RowSetProvider

java.lang.Object
  extended by javax.sql.rowset.RowSetProvider

public class RowSetProvider
extends Object

A factory API that enables applications to obtain a RowSetFactory implementation that can be used to create different types of RowSet implementations.

Example:

 RowSetFactory aFactory = RowSetProvider.newFactory();
 CachedRowSet crs = aFactory.createCachedRowSet();
 ...
 RowSetFactory rsf = RowSetProvider.newFactory("com.sun.rowset.RowSetFactoryImpl", null);
 WebRowSet wrs = rsf.createWebRowSet();
 

Tracing of this class may be enabled by setting the System property javax.sql.rowset.RowSetFactory.debug to any value but false.

Since:
1.7

Constructor Summary
Modifier Constructor and Description
protected RowSetProvider()
           
 
Method Summary
Modifier and Type Method and Description
static RowSetFactory newFactory()
          Creates a new instance of a RowSetFactory implementation.
static RowSetFactory newFactory(String factoryClassName, ClassLoader cl)
          Creates a new instance of a RowSetFactory from the specified factory class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowSetProvider

protected RowSetProvider()
Method Detail

newFactory

public static RowSetFactory newFactory()
                                throws SQLException

Creates a new instance of a RowSetFactory implementation. This method uses the following look up order to determine the RowSetFactory implementation class to load:

Once an application has obtained a reference to a RowSetFactory, it can use the factory to obtain RowSet instances.

Returns:
New instance of a RowSetFactory
Throws:
SQLException - if the default factory class cannot be loaded, instantiated. The cause will be set to actual Exception
Since:
1.7
See Also:
ServiceLoader

newFactory

public static RowSetFactory newFactory(String factoryClassName,
                                       ClassLoader cl)
                                throws SQLException

Creates a new instance of a RowSetFactory from the specified factory class name. This function is useful when there are multiple providers in the classpath. It gives more control to the application as it can specify which provider should be loaded.

Once an application has obtained a reference to a RowSetFactory it can use the factory to obtain RowSet instances.

Parameters:
factoryClassName - fully qualified factory class name that provides an implementation of javax.sql.rowset.RowSetFactory.
cl - ClassLoader used to load the factory class. If null current Thread's context classLoader is used to load the factory class.
Returns:
New instance of a RowSetFactory
Throws:
SQLException - if factoryClassName is null, or the factory class cannot be loaded, instantiated.
Since:
1.7
See Also:
newFactory()

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2010, Oracle Corporation. All rights reserved.
DRAFT ea-b118

Scripting on this page tracks web page traffic, but does not change the content in any way.