Class RowSetProvider
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RowSetFactoryCreates a new instance of aRowSetFactoryimplementation.static RowSetFactorynewFactory(String factoryClassName, ClassLoader cl) Creates a new instance of aRowSetFactoryfrom the specified factory class name.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
RowSetProvider
protected RowSetProvider()RowSetProvider constructor
-
-
Method Details
-
newFactory
Creates a new instance of a
RowSetFactoryimplementation. This method uses the following look up order to determine theRowSetFactoryimplementation 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:
-
The System property
-
newFactory
Creates a new instance of a
RowSetFactoryfrom 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
RowSetFactoryit 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:
-