Class RowSetProvider
public class RowSetProvider extends Object
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 | Description |
|---|---|---|
protected |
RowSetProvider constructor |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
static RowSetFactory |
newFactory() |
Creates a new instance of a RowSetFactory implementation. |
static RowSetFactory |
newFactory |
Creates a new instance of a RowSetFactory from the specified factory class name. |
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | Modifier and Type | Method | Description |
|---|---|---|
protected Object |
clone() |
Creates and returns a copy of this object. |
boolean |
equals |
Indicates whether some other object is "equal to" this one. |
protected void |
finalize() |
Deprecated, for removal: This API element is subject to removal in a future version. Finalization is deprecated and subject to removal in a future release. |
final Class |
getClass() |
Returns the runtime class of this Object. |
int |
hashCode() |
Returns a hash code value for this object. |
final void |
notify() |
Wakes up a single thread that is waiting on this object's monitor. |
final void |
notifyAll() |
Wakes up all threads that are waiting on this object's monitor. |
String |
toString() |
Returns a string representation of the object. |
final void |
wait() |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
Constructor Details
RowSetProvider
protected RowSetProvider()
Method Details
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:
- The System property
javax.sql.rowset.RowSetFactory. For example:- -Djavax.sql.rowset.RowSetFactory=com.sun.rowset.RowSetFactoryImpl
- The
ServiceLoaderAPI. TheServiceLoaderAPI will look for a class name in the fileMETA-INF/services/javax.sql.rowset.RowSetFactoryin jars available to the runtime. For example, to have the RowSetFactory implementationcom.sun.rowset.RowSetFactoryImplloaded, the entry inMETA-INF/services/javax.sql.rowset.RowSetFactorywould be:-
com.sun.rowset.RowSetFactoryImpl
-
- Platform default
RowSetFactoryinstance.
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:
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 ofjavax.sql.rowset.RowSetFactory. -
cl-ClassLoaderused to load the factory class. IfnullcurrentThread's context classLoader is used to load the factory class. - Returns:
- New instance of a
RowSetFactory - Throws:
-
SQLException- iffactoryClassNameisnull, or the factory class cannot be loaded, instantiated. - Since:
- 1.7
- See Also:
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.