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
.
Modifier | Constructor | Description |
---|---|---|
protected |
RowSetProvider constructor |
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. |
protected RowSetProvider()
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:
javax.sql.rowset.RowSetFactory
. For example: ServiceLoader
API. The ServiceLoader
API will look for a class name in the file META-INF/services/javax.sql.rowset.RowSetFactory
in jars available to the runtime. For example, to have the RowSetFactory implementation com.sun.rowset.RowSetFactoryImpl
loaded, the entry in META-INF/services/javax.sql.rowset.RowSetFactory
would be: com.sun.rowset.RowSetFactoryImpl
RowSetFactory
instance. Once an application has obtained a reference to a RowSetFactory
, it can use the factory to obtain RowSet instances.
RowSetFactory
SQLException
- if the default factory class cannot be loaded, instantiated. The cause will be set to actual Exceptionpublic 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.
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.RowSetFactory
SQLException
- if factoryClassName
is null
, or the factory class cannot be loaded, instantiated.
© 1993, 2023, 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.
https://docs.oracle.com/en/java/javase/21/docs/api/java.sql.rowset/javax/sql/rowset/RowSetProvider.html