A OPLCachedRowSet is a disconnected, serializable, scrollable container for tabular data. A primary purpose of the OPLCachedRowSet class is to provide a representation of a JDBC ResultSet that can be passed between different components of a remote application. For example, a OPLCachedRowSet can be used to send the result of a query executed by an Enterprise JavaBeans component running in a server environment over a network to a client running in a web browser. A second use for OPLCachedRowSets is to provide scrolling and updating for ResultSets that don't provide these capabilities themselves. A OPLCachedRowSet can be used to augment the capabilities of a JDBC driver that doesn't have full support for scrolling and updating. Finally, a OPLCachedRowSet can be used to provide Java applications with access to tabular data in an environment such as a thin client or PDA, where it would be inappropriate to use a JDBC driver due to resource limitations or security considerations. The OPLCachedRowSet class provides a means to "get rows in" and "get changed rows out" without the need to implement the full JDBC API.
A OPLCachedRowSet object can contain data retrieved via a JDBC driver or data from some other source, such as a spreadsheet. Both a OPLCachedRowSet object and its metadata can be created from scratch. A component that acts as a factory for rowsets can use this capability to create a rowset containing data from non-JDBC data sources.
The term 'disconnected' implies that a OPLCachedRowSet only makes use of a JDBC connection briefly while data is being read from the database and used to populate it with rows, and again while updated rows are being propagated back to the underlying database. During the remainder of its lifetime, a OPLCachedRowSet object isn't associated with an underlying database connection. A OPLCachedRowSet object can simply be thought of as a disconnected set of rows that are being cached outside of a data source. Since all data is cached in memory, OPLCachedRowSets are not appropriate for extremely large data sets.
The contents of a OPLCachedRowSet may be updated and the updates can be propagated to an underlying data source. OPLCachedRowSets support an optimistic concurrency control mechanism - no locks are maintained in the underlying database during disconnected use of the rowset. Both the original value and current value of the OPLCachedRowSet are maintained for use by the optimistic routines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|