K.Yellaswamy,Assistant Professor|CMR College of Engineering & Technology
Email:toyellaswamy@gmail.com
o RowSetEvent
As part of its internal notification process, a RowSet object creates an instance of
RowSetEvent and passes it to the listener. The listener can use this RowSetEvent
object to find out which rowset had the event.
2. Metadata
o RowSetMetaData
This interface, derived from the ResultSetMetaData interface, provides
information about the columns in a RowSet object. An application can use
RowSetMetaData methods to find out how many columns the rowset contains and
what kind of data each column can contain.
The RowSetMetaData interface provides methods for setting the information
about columns, but an application would not normally use these methods. When
an application calls the RowSet method execute, the RowSet object will contain a
new set of rows, and its RowSetMetaData object will have been internally updated
to contain information about the new columns.
3. The Reader/Writer Facility
A RowSet object that implements the RowSetInternal interface can call on the
RowSetReader object associated with it to populate itself with data. It can also call on the
RowSetWriter object associated with it to write any changes to its rows back to the data
source from which it originally got the rows. A rowset that remains connected to its data
source does not need to use a reader and writer because it can simply operate on the data
source directly.
o RowSetInternal
By implementing the RowSetInternal interface, a RowSet object gets access to
its internal state and is able to call on its reader and writer. A rowset keeps track
of the values in its current rows and of the values that immediately preceded the
current ones, referred to as the original values. A rowset also keeps track of (1)
the parameters that have been set for its command and (2) the connection that was
passed to it, if any. A rowset uses the RowSetInternal methods behind the
scenes to get access to this information. An application does not normally invoke
these methods directly.
o RowSetReader
A disconnected RowSet object that has implemented the RowSetInternal
interface can call on its reader (the RowSetReader object associated with it) to
populate it with data. When an application calls the RowSet.execute method,
that method calls on the rowset's reader to do much of the work. Implementations
can vary widely, but generally a reader makes a connection to the data source,
reads data from the data source and populates the rowset with it, and closes the
connection. A reader may also update the RowSetMetaData object for its rowset.
The rowset's internal state is also updated, either by the reader or directly by the
method RowSet.execute.
o RowSetWriter
A disconnected RowSet object that has implemented the RowSetInternal
interface can call on its writer (the RowSetWriter object associated with it) to