The object crs has the same default values for its properties that a JdbcRowSet object has when it is first created. RowSetFactory factory = RowSetProvider.newFactory() ĬachedRowSet crs = factory.createCachedRowSet() Setting up a CachedRowSet object involves the following:Ĭreate a new CachedRowSet object by using an instance of RowSetFactory, which is created from the class RowSetProvider.ĬachedRowSetSample.java creates a CachedRowSet object: The CachedRowSet interface has a RowSetReader object that reads data from a relational database, so in this tutorial, the data source is always a database. This is true when the RowSetReader object for a disconnected RowSet object is implemented to read data from such a data source. For example, a flat file or spreadsheet could be the source of data. Note that although the data source for a CachedRowSet object (and the RowSet objects derived from it) is almost always a relational database, a CachedRowSet object is capable of getting data from any data source that stores its data in a tabular format. The CachedRowSet interface is the superinterface for all disconnected RowSet objects, so everything demonstrated here also applies to WebRowSet, JoinRowSet, and FilteredRowSet objects. It gets its name from the fact that it stores (caches) its data in memory so that it can operate on its own data rather than on the data stored in a database. A CachedRowSet object is special in that it can operate without being connected to its data source, that is, it is a disconnected RowSet object.
0 Comments
Leave a Reply. |