Interface FilteredRowSet
- All Superinterfaces:
AutoCloseable, CachedRowSet, Joinable, ResultSet, RowSet, WebRowSet, Wrapper
FilteredRowSet must implement. The FilteredRowSetImpl class
provides the reference implementation which may be extended if required.
Alternatively, a vendor is free to implement its own version
by implementing this interface.
1.0 Background
There are occasions when aRowSet object has a need to provide a degree
of filtering to its contents. One possible solution is to provide
a query language for all standard RowSet implementations; however,
this is an impractical approach for lightweight components such as disconnected
RowSet
objects. The FilteredRowSet interface seeks to address this need
without supplying a heavyweight query language along with the processing that
such a query language would require.
A JDBC FilteredRowSet standard implementation implements the
RowSet interfaces and extends the
CachedRowSet class. The
CachedRowSet class provides a set of protected cursor manipulation
methods, which a FilteredRowSet implementation can override
to supply filtering support.
2.0 Predicate Sharing
If aFilteredRowSet implementation is shared using the
inherited createShared method in parent interfaces, the
Predicate should be shared without modification by all
FilteredRowSet instance clones.
3.0 Usage
By implementing a Predicate (see example in Predicate
class JavaDoc), a FilteredRowSet could then be used as described
below.
FilteredRowSet frs = new FilteredRowSetImpl();
frs.populate(rs);
Range name = new Range("Alpha", "Bravo", "columnName");
frs.setFilter(name);
frs.next() // only names from "Alpha" to "Bravo" will be returned
In the example above, we initialize a Range object which
implements the Predicate interface. This object expresses
the following constraints: All rows outputted or modified from this
FilteredRowSet object must fall between the values 'Alpha' and
'Bravo' both values inclusive, in the column 'columnName'. If a filter is
applied to a FilteredRowSet object that contains no data that
falls within the range of the filter, no rows are returned.
This framework allows multiple classes implementing predicates to be used in combination to achieved the required filtering result with out the need for query language processing.
4.0 Updating a FilteredRowSet Object
The predicate set on a FilteredRowSet object
applies a criterion on all rows in a
RowSet object to manage a subset of rows in a RowSet
object. This criterion governs the subset of rows that are visible and also
defines which rows can be modified, deleted or inserted.
Therefore, the predicate set on a FilteredRowSet object must be
considered as bi-directional and the set criterion as the gating mechanism
for all views and updates to the FilteredRowSet object. Any attempt
to update the FilteredRowSet that violates the criterion will
result in a SQLException object being thrown.
The FilteredRowSet range criterion can be modified by applying
a new Predicate object to the FilteredRowSet
instance at any time. This is possible if no additional references to the
FilteredRowSet object are detected. A new filter has an
immediate effect on criterion enforcement within the
FilteredRowSet object, and all subsequent views and updates will be
subject to similar enforcement.
5.0 Behavior of Rows Outside the Filter
Rows that fall outside of the filter set on aFilteredRowSet
object cannot be modified until the filter is removed or a
new filter is applied.
Furthermore, only rows that fall within the bounds of a filter will be synchronized with the data source.
- Since:
- 1.5
-
Field Summary
Fields declared in interface CachedRowSet
COMMIT_ON_ACCEPT_CHANGESModifier and TypeFieldDescriptionstatic final booleanDeprecated.Because this field is final (it is part of an interface), its value cannot be changed.Fields declared in interface ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVEModifier and TypeFieldDescriptionstatic final intThe constant indicating that openResultSetobjects with this holdability will be closed when the current transaction is committed.static final intThe constant indicating the concurrency mode for aResultSetobject that may NOT be updated.static final intThe constant indicating the concurrency mode for aResultSetobject that may be updated.static final intThe constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.static final intThe constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.static final intThe constant indicating that the order in which rows in a result set will be processed is unknown.static final intThe constant indicating that openResultSetobjects with this holdability will remain open when the current transaction is committed.static final intThe constant indicating the type for aResultSetobject whose cursor may move only forward.static final intThe constant indicating the type for aResultSetobject that is scrollable but generally not sensitive to changes to the data that underlies theResultSet.static final intThe constant indicating the type for aResultSetobject that is scrollable and generally sensitive to changes to the data that underlies theResultSet.Fields declared in interface WebRowSet
PUBLIC_XML_SCHEMA, SCHEMA_SYSTEM_IDModifier and TypeFieldDescriptionstatic final StringThe public identifier for the XML Schema definition that defines the XML tags and their valid values for aWebRowSetimplementation.static final StringThe URL for the XML Schema definition file that defines the XML tags and their valid values for aWebRowSetimplementation. -
Method Summary
Methods declared in interface CachedRowSet
acceptChanges, acceptChanges, columnUpdated, columnUpdated, commit, createCopy, createCopyNoConstraints, createCopySchema, createShared, execute, getKeyColumns, getOriginal, getOriginalRow, getPageSize, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, nextPage, populate, populate, previousPage, release, restoreOriginal, rollback, rollback, rowSetPopulated, setKeyColumns, setMetaData, setOriginalRow, setPageSize, setShowDeleted, setSyncProvider, setTableName, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdateModifier and TypeMethodDescriptionvoidPropagates row update, insert and delete changes made to thisCachedRowSetobject to the underlying data source.voidacceptChanges(Connection con) Propagates all row update, insert and delete changes to the data source backing thisCachedRowSetobject using the specifiedConnectionobject to establish a connection to the data source.booleancolumnUpdated(int idx) Indicates whether the designated column in the current row of thisCachedRowSetobject has been updated.booleancolumnUpdated(String columnName) Indicates whether the designated column in the current row of thisCachedRowSetobject has been updated.voidcommit()EachCachedRowSetobject'sSyncProvidercontains aConnectionobject from theResultSetor JDBC properties passed to it's constructors.Creates aRowSetobject that is a deep copy of the data in thisCachedRowSetobject.Creates aCachedRowSetobject that is a deep copy of thisCachedRowSetobject's data but is independent of it.Creates aCachedRowSetobject that is an empty copy of thisCachedRowSetobject.Returns a newRowSetobject backed by the same data as that of thisCachedRowSetobject.voidexecute(Connection conn) Populates thisCachedRowSetobject with data, using the given connection to produce the result set from which the data will be read.int[]Returns an array containing one or more column numbers indicating the columns that form a key that uniquely identifies a row in thisCachedRowSetobject.Returns aResultSetobject containing the original value of thisCachedRowSetobject.Returns aResultSetobject containing the original value for the current row only of thisCachedRowSetobject.intReturns the page-size for theCachedRowSetobjectRetrieves the first warning reported by calls on thisRowSetobject.booleanRetrieves abooleanindicating whether rows marked for deletion appear in the set of current rows.Retrieves theSyncProviderimplementation for thisCachedRowSetobject.Returns an identifier for the object (table) that was used to create thisCachedRowSetobject.booleannextPage()Increments the current page of theCachedRowSet.voidPopulates thisCachedRowSetobject with data from the givenResultSetobject.voidPopulates thisCachedRowSetobject with data from the givenResultSetobject.booleanDecrements the current page of theCachedRowSet.voidrelease()Releases the current contents of thisCachedRowSetobject and sends arowSetChangedevent to all registered listeners.voidRestores thisCachedRowSetobject to its original value, that is, its value before the last set of changes.voidrollback()EachCachedRowSetobject'sSyncProvidercontains aConnectionobject from the originalResultSetor JDBC properties passed to it.voidEachCachedRowSetobject'sSyncProvidercontains aConnectionobject from the originalResultSetor JDBC properties passed to it.voidrowSetPopulated(RowSetEvent event, int numRows) Notifies registered listeners that a RowSet object in the given RowSetEvent object has populated a number of additional rows.voidsetKeyColumns(int[] keys) Sets thisCachedRowSetobject'skeyColsfield with the given array of column numbers, which forms a key for uniquely identifying a row in thisCachedRowSetobject.voidSets the metadata for thisCachedRowSetobject with the givenRowSetMetaDataobject.voidSets the current row in thisCachedRowSetobject as the original row.voidsetPageSize(int size) Sets theCachedRowSetobject's page-size.voidsetShowDeleted(boolean b) Sets the propertyshowDeletedto the givenbooleanvalue, which determines whether rows marked for deletion appear in the set of current rows.voidsetSyncProvider(String provider) Sets theSyncProviderobject for thisCachedRowSetobject to the one specified.voidsetTableName(String tabName) Sets the identifier for the table from which thisCachedRowSetobject was derived to the given table name.intsize()Returns the number of rows in thisCachedRowSetobject.Collection<?> Converts thisCachedRowSetobject to aCollectionobject that contains all of thisCachedRowSetobject's data.Collection<?> toCollection(int column) Converts the designated column in thisCachedRowSetobject to aCollectionobject.Collection<?> toCollection(String column) Converts the designated column in thisCachedRowSetobject to aCollectionobject.voidCancels the deletion of the current row and notifies listeners that a row has changed.voidImmediately removes the current row from thisCachedRowSetobject if the row has been inserted, and also notifies listeners that a row has changed.voidImmediately reverses the last update operation if the row has been modified.Methods declared in interface Joinable
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumnModifier and TypeMethodDescriptionint[]Retrieves the indexes of the match columns that were set for thisRowSetobject with the methodsetMatchColumn(int[] columnIdxes).String[]Retrieves the names of the match columns that were set for thisRowSetobject with the methodsetMatchColumn(String [] columnNames).voidsetMatchColumn(int columnIdx) Sets the designated column as the match column for thisRowSetobject.voidsetMatchColumn(int[] columnIdxes) Sets the designated columns as the match column for thisRowSetobject.voidsetMatchColumn(String columnName) Sets the designated column as the match column for thisRowSetobject.voidsetMatchColumn(String[] columnNames) Sets the designated columns as the match column for thisRowSetobject.voidunsetMatchColumn(int columnIdx) Unsets the designated column as the match column for thisRowSetobject.voidunsetMatchColumn(int[] columnIdxes) Unsets the designated columns as the match column for thisRowSetobject.voidunsetMatchColumn(String columnName) Unsets the designated column as the match column for thisRowSetobject.voidunsetMatchColumn(String[] columnName) Unsets the designated columns as the match columns for thisRowSetobject.Methods declared in interface ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNullModifier and TypeMethodDescriptionbooleanabsolute(int row) Moves the cursor to the given row number in thisResultSetobject.voidMoves the cursor to the end of thisResultSetobject, just after the last row.voidMoves the cursor to the front of thisResultSetobject, just before the first row.voidCancels the updates made to the current row in thisResultSetobject.voidClears all warnings reported on thisResultSetobject.voidclose()Releases thisResultSetobject's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.voidDeletes the current row from thisResultSetobject and from the underlying database.intfindColumn(String columnLabel) Maps the givenResultSetcolumn label to itsResultSetcolumn index.booleanfirst()Moves the cursor to the first row in thisResultSetobject.getArray(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as anArrayobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as anArrayobject in the Java programming language.getAsciiStream(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as a stream of ASCII characters.getAsciiStream(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as a stream of ASCII characters.getBigDecimal(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.math.BigDecimalwith full precision.getBigDecimal(int columnIndex, int scale) Deprecated.UsegetBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel)getBigDecimal(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.math.BigDecimalwith full precision.getBigDecimal(String columnLabel, int scale) Deprecated.UsegetBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel)getBinaryStream(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as a stream of uninterpreted bytes.getBinaryStream(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as a stream of uninterpretedbytes.getBlob(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aBlobobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as aBlobobject in the Java programming language.booleangetBoolean(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as abooleanin the Java programming language.booleangetBoolean(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as abooleanin the Java programming language.bytegetByte(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as abytein the Java programming language.byteRetrieves the value of the designated column in the current row of thisResultSetobject as abytein the Java programming language.byte[]getBytes(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as abytearray in the Java programming language.byte[]Retrieves the value of the designated column in the current row of thisResultSetobject as abytearray in the Java programming language.getCharacterStream(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject.getCharacterStream(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject.getClob(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aClobobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as aClobobject in the Java programming language.intRetrieves the concurrency mode of thisResultSetobject.Retrieves the name of the SQL cursor used by thisResultSetobject.getDate(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Dateobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Dateobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Dateobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Dateobject in the Java programming language.doublegetDouble(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as adoublein the Java programming language.doubleRetrieves the value of the designated column in the current row of thisResultSetobject as adoublein the Java programming language.intRetrieves the fetch direction for thisResultSetobject.intRetrieves the fetch size for thisResultSetobject.floatgetFloat(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as afloatin the Java programming language.floatRetrieves the value of the designated column in the current row of thisResultSetobject as afloatin the Java programming language.intRetrieves the holdability of thisResultSetobjectintgetInt(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as anintin the Java programming language.intRetrieves the value of the designated column in the current row of thisResultSetobject as anintin the Java programming language.longgetLong(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as alongin the Java programming language.longRetrieves the value of the designated column in the current row of thisResultSetobject as alongin the Java programming language.Retrieves the number, types and properties of thisResultSetobject's columns.getNCharacterStream(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject.getNCharacterStream(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject.getNClob(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aNClobobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as aNClobobject in the Java programming language.getNString(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language.getNString(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language.getObject(int columnIndex) Gets the value of the designated column in the current row of thisResultSetobject as anObjectin the Java programming language.<T> TRetrieves the value of the designated column in the current row of thisResultSetobject and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.Retrieves the value of the designated column in the current row of thisResultSetobject as anObjectin the Java programming language.Gets the value of the designated column in the current row of thisResultSetobject as anObjectin the Java programming language.<T> TRetrieves the value of the designated column in the current row of thisResultSetobject and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.Retrieves the value of the designated column in the current row of thisResultSetobject as anObjectin the Java programming language.getRef(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aRefobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as aRefobject in the Java programming language.intgetRow()Retrieves the current row number.getRowId(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.RowIdobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.RowIdobject in the Java programming language.shortgetShort(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ashortin the Java programming language.shortRetrieves the value of the designated column in the current row of thisResultSetobject as ashortin the Java programming language.getSQLXML(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetas ajava.sql.SQLXMLobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetas ajava.sql.SQLXMLobject in the Java programming language.Retrieves theStatementobject that produced thisResultSetobject.getString(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language.getTime(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timeobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timeobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timeobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timeobject in the Java programming language.getTimestamp(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timestampobject in the Java programming language.getTimestamp(int columnIndex, Calendar cal) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timestampobject in the Java programming language.getTimestamp(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timestampobject in the Java programming language.getTimestamp(String columnLabel, Calendar cal) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.Timestampobject in the Java programming language.intgetType()Retrieves the type of thisResultSetobject.getUnicodeStream(int columnIndex) Deprecated.usegetCharacterStreamin place ofgetUnicodeStreamgetUnicodeStream(String columnLabel) Deprecated.usegetCharacterStreaminsteadgetURL(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.net.URLobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.net.URLobject in the Java programming language.Retrieves the first warning reported by calls on thisResultSetobject.voidInserts the contents of the insert row into thisResultSetobject and into the database.booleanRetrieves whether the cursor is after the last row in thisResultSetobject.booleanRetrieves whether the cursor is before the first row in thisResultSetobject.booleanisClosed()Retrieves whether thisResultSetobject has been closed.booleanisFirst()Retrieves whether the cursor is on the first row of thisResultSetobject.booleanisLast()Retrieves whether the cursor is on the last row of thisResultSetobject.booleanlast()Moves the cursor to the last row in thisResultSetobject.voidMoves the cursor to the remembered cursor position, usually the current row.voidMoves the cursor to the insert row.booleannext()Moves the cursor forward one row from its current position.booleanprevious()Moves the cursor to the previous row in thisResultSetobject.voidRefreshes the current row with its most recent value in the database.booleanrelative(int rows) Moves the cursor a relative number of rows, either positive or negative.booleanRetrieves whether a row has been deleted.booleanRetrieves whether the current row has had an insertion.booleanRetrieves whether the current row has been updated.voidsetFetchDirection(int direction) Gives a hint as to the direction in which the rows in thisResultSetobject will be processed.voidsetFetchSize(int rows) Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for thisResultSetobject.voidupdateArray(int columnIndex, Array x) Updates the designated column with ajava.sql.Arrayvalue.voidupdateArray(String columnLabel, Array x) Updates the designated column with ajava.sql.Arrayvalue.voidupdateAsciiStream(int columnIndex, InputStream x) Updates the designated column with an ascii stream value.voidupdateAsciiStream(int columnIndex, InputStream x, int length) Updates the designated column with an ascii stream value, which will have the specified number of bytes.voidupdateAsciiStream(int columnIndex, InputStream x, long length) Updates the designated column with an ascii stream value, which will have the specified number of bytes.voidupdateAsciiStream(String columnLabel, InputStream x) Updates the designated column with an ascii stream value.voidupdateAsciiStream(String columnLabel, InputStream x, int length) Updates the designated column with an ascii stream value, which will have the specified number of bytes.voidupdateAsciiStream(String columnLabel, InputStream x, long length) Updates the designated column with an ascii stream value, which will have the specified number of bytes.voidupdateBigDecimal(int columnIndex, BigDecimal x) Updates the designated column with ajava.math.BigDecimalvalue.voidupdateBigDecimal(String columnLabel, BigDecimal x) Updates the designated column with ajava.sql.BigDecimalvalue.voidupdateBinaryStream(int columnIndex, InputStream x) Updates the designated column with a binary stream value.voidupdateBinaryStream(int columnIndex, InputStream x, int length) Updates the designated column with a binary stream value, which will have the specified number of bytes.voidupdateBinaryStream(int columnIndex, InputStream x, long length) Updates the designated column with a binary stream value, which will have the specified number of bytes.voidupdateBinaryStream(String columnLabel, InputStream x) Updates the designated column with a binary stream value.voidupdateBinaryStream(String columnLabel, InputStream x, int length) Updates the designated column with a binary stream value, which will have the specified number of bytes.voidupdateBinaryStream(String columnLabel, InputStream x, long length) Updates the designated column with a binary stream value, which will have the specified number of bytes.voidupdateBlob(int columnIndex, InputStream inputStream) Updates the designated column using the given input stream.voidupdateBlob(int columnIndex, InputStream inputStream, long length) Updates the designated column using the given input stream, which will have the specified number of bytes.voidupdateBlob(int columnIndex, Blob x) Updates the designated column with ajava.sql.Blobvalue.voidupdateBlob(String columnLabel, InputStream inputStream) Updates the designated column using the given input stream.voidupdateBlob(String columnLabel, InputStream inputStream, long length) Updates the designated column using the given input stream, which will have the specified number of bytes.voidupdateBlob(String columnLabel, Blob x) Updates the designated column with ajava.sql.Blobvalue.voidupdateBoolean(int columnIndex, boolean x) Updates the designated column with abooleanvalue.voidupdateBoolean(String columnLabel, boolean x) Updates the designated column with abooleanvalue.voidupdateByte(int columnIndex, byte x) Updates the designated column with abytevalue.voidupdateByte(String columnLabel, byte x) Updates the designated column with abytevalue.voidupdateBytes(int columnIndex, byte[] x) Updates the designated column with abytearray value.voidupdateBytes(String columnLabel, byte[] x) Updates the designated column with a byte array value.voidupdateCharacterStream(int columnIndex, Reader x) Updates the designated column with a character stream value.voidupdateCharacterStream(int columnIndex, Reader x, int length) Updates the designated column with a character stream value, which will have the specified number of bytes.voidupdateCharacterStream(int columnIndex, Reader x, long length) Updates the designated column with a character stream value, which will have the specified number of bytes.voidupdateCharacterStream(String columnLabel, Reader reader) Updates the designated column with a character stream value.voidupdateCharacterStream(String columnLabel, Reader reader, int length) Updates the designated column with a character stream value, which will have the specified number of bytes.voidupdateCharacterStream(String columnLabel, Reader reader, long length) Updates the designated column with a character stream value, which will have the specified number of bytes.voidupdateClob(int columnIndex, Reader reader) Updates the designated column using the givenReaderobject.voidupdateClob(int columnIndex, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateClob(int columnIndex, Clob x) Updates the designated column with ajava.sql.Clobvalue.voidupdateClob(String columnLabel, Reader reader) Updates the designated column using the givenReaderobject.voidupdateClob(String columnLabel, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateClob(String columnLabel, Clob x) Updates the designated column with ajava.sql.Clobvalue.voidupdateDate(int columnIndex, Date x) Updates the designated column with ajava.sql.Datevalue.voidupdateDate(String columnLabel, Date x) Updates the designated column with ajava.sql.Datevalue.voidupdateDouble(int columnIndex, double x) Updates the designated column with adoublevalue.voidupdateDouble(String columnLabel, double x) Updates the designated column with adoublevalue.voidupdateFloat(int columnIndex, float x) Updates the designated column with afloatvalue.voidupdateFloat(String columnLabel, float x) Updates the designated column with afloatvalue.voidupdateInt(int columnIndex, int x) Updates the designated column with anintvalue.voidUpdates the designated column with anintvalue.voidupdateLong(int columnIndex, long x) Updates the designated column with alongvalue.voidupdateLong(String columnLabel, long x) Updates the designated column with alongvalue.voidupdateNCharacterStream(int columnIndex, Reader x) Updates the designated column with a character stream value.voidupdateNCharacterStream(int columnIndex, Reader x, long length) Updates the designated column with a character stream value, which will have the specified number of bytes.voidupdateNCharacterStream(String columnLabel, Reader reader) Updates the designated column with a character stream value.voidupdateNCharacterStream(String columnLabel, Reader reader, long length) Updates the designated column with a character stream value, which will have the specified number of bytes.voidupdateNClob(int columnIndex, Reader reader) Updates the designated column using the givenReaderThe data will be read from the stream as needed until end-of-stream is reached.voidupdateNClob(int columnIndex, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateNClob(int columnIndex, NClob nClob) Updates the designated column with ajava.sql.NClobvalue.voidupdateNClob(String columnLabel, Reader reader) Updates the designated column using the givenReaderobject.voidupdateNClob(String columnLabel, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateNClob(String columnLabel, NClob nClob) Updates the designated column with ajava.sql.NClobvalue.voidupdateNString(int columnIndex, String nString) Updates the designated column with aStringvalue.voidupdateNString(String columnLabel, String nString) Updates the designated column with aStringvalue.voidupdateNull(int columnIndex) Updates the designated column with anullvalue.voidupdateNull(String columnLabel) Updates the designated column with anullvalue.voidupdateObject(int columnIndex, Object x) Updates the designated column with anObjectvalue.voidupdateObject(int columnIndex, Object x, int scaleOrLength) Updates the designated column with anObjectvalue.default voidupdateObject(int columnIndex, Object x, SQLType targetSqlType) Updates the designated column with anObjectvalue.default voidupdateObject(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) Updates the designated column with anObjectvalue.voidupdateObject(String columnLabel, Object x) Updates the designated column with anObjectvalue.voidupdateObject(String columnLabel, Object x, int scaleOrLength) Updates the designated column with anObjectvalue.default voidupdateObject(String columnLabel, Object x, SQLType targetSqlType) Updates the designated column with anObjectvalue.default voidupdateObject(String columnLabel, Object x, SQLType targetSqlType, int scaleOrLength) Updates the designated column with anObjectvalue.voidUpdates the designated column with ajava.sql.Refvalue.voidUpdates the designated column with ajava.sql.Refvalue.voidUpdates the underlying database with the new contents of the current row of thisResultSetobject.voidupdateRowId(int columnIndex, RowId x) Updates the designated column with aRowIdvalue.voidupdateRowId(String columnLabel, RowId x) Updates the designated column with aRowIdvalue.voidupdateShort(int columnIndex, short x) Updates the designated column with ashortvalue.voidupdateShort(String columnLabel, short x) Updates the designated column with ashortvalue.voidupdateSQLXML(int columnIndex, SQLXML xmlObject) Updates the designated column with ajava.sql.SQLXMLvalue.voidupdateSQLXML(String columnLabel, SQLXML xmlObject) Updates the designated column with ajava.sql.SQLXMLvalue.voidupdateString(int columnIndex, String x) Updates the designated column with aStringvalue.voidupdateString(String columnLabel, String x) Updates the designated column with aStringvalue.voidupdateTime(int columnIndex, Time x) Updates the designated column with ajava.sql.Timevalue.voidupdateTime(String columnLabel, Time x) Updates the designated column with ajava.sql.Timevalue.voidupdateTimestamp(int columnIndex, Timestamp x) Updates the designated column with ajava.sql.Timestampvalue.voidupdateTimestamp(String columnLabel, Timestamp x) Updates the designated column with ajava.sql.Timestampvalue.booleanwasNull()Reports whether the last column read had a value of SQLNULL.Methods declared in interface RowSet
addRowSetListener, clearParameters, execute, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBlob, setBlob, setBlob, setBoolean, setBoolean, setByte, setByte, setBytes, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setClob, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDate, setDate, setDouble, setDouble, setEscapeProcessing, setFloat, setFloat, setInt, setInt, setLong, setLong, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setRowId, setRowId, setShort, setShort, setSQLXML, setSQLXML, setString, setString, setTime, setTime, setTime, setTime, setTimestamp, setTimestamp, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setURL, setUsernameModifier and TypeMethodDescriptionvoidaddRowSetListener(RowSetListener listener) Registers the given listener so that it will be notified of events that occur on thisRowSetobject.voidClears the parameters set for thisRowSetobject's command.voidexecute()Fills thisRowSetobject with data.Retrieves thisRowSetobject's command property.Retrieves the logical name that identifies the data source for thisRowSetobject.booleanRetrieves whether escape processing is enabled for thisRowSetobject.intRetrieves the maximum number of bytes that may be returned for certain column values.intRetrieves the maximum number of rows that thisRowSetobject can contain.Retrieves the password used to create a database connection.intRetrieves the maximum number of seconds the driver will wait for a statement to execute.intRetrieves the transaction isolation level set for thisRowSetobject.Retrieves theMapobject associated with thisRowSetobject, which specifies the custom mapping of SQL user-defined types, if any.getUrl()Retrieves the url property thisRowSetobject will use to create a connection if it uses theDriverManagerinstead of aDataSourceobject to establish the connection.Retrieves the username used to create a database connection for thisRowSetobject.booleanRetrieves whether thisRowSetobject is read-only.voidremoveRowSetListener(RowSetListener listener) Removes the specified listener from the list of components that will be notified when an event occurs on thisRowSetobject.voidSets the designated parameter in thisRowSetobject's command with the givenArrayvalue.voidsetAsciiStream(int parameterIndex, InputStream x) Sets the designated parameter in thisRowSetobject's command to the given input stream.voidsetAsciiStream(int parameterIndex, InputStream x, int length) Sets the designated parameter in thisRowSetobject's command to the givenjava.io.InputStreamvalue.voidsetAsciiStream(String parameterName, InputStream x) Sets the designated parameter to the given input stream.voidsetAsciiStream(String parameterName, InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.voidsetBigDecimal(int parameterIndex, BigDecimal x) Sets the designated parameter in thisRowSetobject's command to the givenjava.math.BigDecimalvalue.voidsetBigDecimal(String parameterName, BigDecimal x) Sets the designated parameter to the givenjava.math.BigDecimalvalue.voidsetBinaryStream(int parameterIndex, InputStream x) Sets the designated parameter in thisRowSetobject's command to the given input stream.voidsetBinaryStream(int parameterIndex, InputStream x, int length) Sets the designated parameter in thisRowSetobject's command to the givenjava.io.InputStreamvalue.voidsetBinaryStream(String parameterName, InputStream x) Sets the designated parameter to the given input stream.voidsetBinaryStream(String parameterName, InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.voidsetBlob(int parameterIndex, InputStream inputStream) Sets the designated parameter to aInputStreamobject.voidsetBlob(int parameterIndex, InputStream inputStream, long length) Sets the designated parameter to aInputStreamobject.voidSets the designated parameter in thisRowSetobject's command with the givenBlobvalue.voidsetBlob(String parameterName, InputStream inputStream) Sets the designated parameter to aInputStreamobject.voidsetBlob(String parameterName, InputStream inputStream, long length) Sets the designated parameter to aInputStreamobject.voidSets the designated parameter to the givenjava.sql.Blobobject.voidsetBoolean(int parameterIndex, boolean x) Sets the designated parameter in thisRowSetobject's command to the given Javabooleanvalue.voidsetBoolean(String parameterName, boolean x) Sets the designated parameter to the given Javabooleanvalue.voidsetByte(int parameterIndex, byte x) Sets the designated parameter in thisRowSetobject's command to the given Javabytevalue.voidSets the designated parameter to the given Javabytevalue.voidsetBytes(int parameterIndex, byte[] x) Sets the designated parameter in thisRowSetobject's command to the given Java array ofbytevalues.voidSets the designated parameter to the given Java array of bytes.voidsetCharacterStream(int parameterIndex, Reader reader) Sets the designated parameter in thisRowSetobject's command to the givenReaderobject.voidsetCharacterStream(int parameterIndex, Reader reader, int length) Sets the designated parameter in thisRowSetobject's command to the givenjava.io.Readervalue.voidsetCharacterStream(String parameterName, Reader reader) Sets the designated parameter to the givenReaderobject.voidsetCharacterStream(String parameterName, Reader reader, int length) Sets the designated parameter to the givenReaderobject, which is the given number of characters long.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to aReaderobject.voidSets the designated parameter in thisRowSetobject's command with the givenClobvalue.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to the givenjava.sql.Clobobject.voidsetCommand(String cmd) Sets thisRowSetobject's command property to the given SQL query.voidsetConcurrency(int concurrency) Sets the concurrency of thisRowSetobject to the given concurrency level.voidsetDataSourceName(String name) Sets the data source name property for thisRowSetobject to the givenString.voidSets the designated parameter in thisRowSetobject's command to the givenjava.sql.Datevalue.voidSets the designated parameter in thisRowSetobject's command with the givenjava.sql.Datevalue.voidSets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidSets the designated parameter to the givenjava.sql.Datevalue, using the givenCalendarobject.voidsetDouble(int parameterIndex, double x) Sets the designated parameter in thisRowSetobject's command to the given Javadoublevalue.voidSets the designated parameter to the given Javadoublevalue.voidsetEscapeProcessing(boolean enable) Sets escape processing for thisRowSetobject on or off.voidsetFloat(int parameterIndex, float x) Sets the designated parameter in thisRowSetobject's command to the given Javafloatvalue.voidSets the designated parameter to the given Javafloatvalue.voidsetInt(int parameterIndex, int x) Sets the designated parameter in thisRowSetobject's command to the given Javaintvalue.voidSets the designated parameter to the given Javaintvalue.voidsetLong(int parameterIndex, long x) Sets the designated parameter in thisRowSetobject's command to the given Javalongvalue.voidSets the designated parameter to the given Javalongvalue.voidsetMaxFieldSize(int max) Sets the maximum number of bytes that can be returned for a column value to the given number of bytes.voidsetMaxRows(int max) Sets the maximum number of rows that thisRowSetobject can contain to the specified number.voidsetNCharacterStream(int parameterIndex, Reader value) Sets the designated parameter in thisRowSetobject's command to aReaderobject.voidsetNCharacterStream(int parameterIndex, Reader value, long length) Sets the designated parameter to aReaderobject.voidsetNCharacterStream(String parameterName, Reader value) Sets the designated parameter to aReaderobject.voidsetNCharacterStream(String parameterName, Reader value, long length) Sets the designated parameter to aReaderobject.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to ajava.sql.NClobobject.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to aReaderobject.voidSets the designated parameter to ajava.sql.NClobobject.voidsetNString(int parameterIndex, String value) Sets the designated parameter to the givenStringobject.voidsetNString(String parameterName, String value) Sets the designated parameter to the givenStringobject.voidsetNull(int parameterIndex, int sqlType) Sets the designated parameter in thisRowSetobject's SQL command to SQLNULL.voidSets the designated parameter in thisRowSetobject's SQL command to SQLNULL.voidSets the designated parameter to SQLNULL.voidSets the designated parameter to SQLNULL.voidSets the designated parameter in thisRowSetobject's command with a JavaObject.voidSets the designated parameter in thisRowSetobject's command with a JavaObject.voidSets the designated parameter in thisRowSetobject's command with the given JavaObject.voidSets the value of the designated parameter with the given object.voidSets the value of the designated parameter with the given object.voidSets the value of the designated parameter with the given object.voidsetPassword(String password) Sets the database password for thisRowSetobject to the givenString.voidsetQueryTimeout(int seconds) Sets the maximum time the driver will wait for a statement to execute to the given number of seconds.voidsetReadOnly(boolean value) Sets whether thisRowSetobject is read-only to the givenboolean.voidSets the designated parameter in thisRowSetobject's command with the givenRefvalue.voidSets the designated parameter to the givenjava.sql.RowIdobject.voidSets the designated parameter to the givenjava.sql.RowIdobject.voidsetShort(int parameterIndex, short x) Sets the designated parameter in thisRowSetobject's command to the given Javashortvalue.voidSets the designated parameter to the given Javashortvalue.voidSets the designated parameter to the givenjava.sql.SQLXMLobject.voidSets the designated parameter to the givenjava.sql.SQLXMLobject.voidSets the designated parameter in thisRowSetobject's command to the given JavaStringvalue.voidSets the designated parameter to the given JavaStringvalue.voidSets the designated parameter in thisRowSetobject's command to the givenjava.sql.Timevalue.voidSets the designated parameter in thisRowSetobject's command with the givenjava.sql.Timevalue.voidSets the designated parameter to the givenjava.sql.Timevalue.voidSets the designated parameter to the givenjava.sql.Timevalue, using the givenCalendarobject.voidsetTimestamp(int parameterIndex, Timestamp x) Sets the designated parameter in thisRowSetobject's command to the givenjava.sql.Timestampvalue.voidsetTimestamp(int parameterIndex, Timestamp x, Calendar cal) Sets the designated parameter in thisRowSetobject's command with the givenjava.sql.Timestampvalue.voidsetTimestamp(String parameterName, Timestamp x) Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(String parameterName, Timestamp x, Calendar cal) Sets the designated parameter to the givenjava.sql.Timestampvalue, using the givenCalendarobject.voidsetTransactionIsolation(int level) Sets the transaction isolation level for thisRowSetobject.voidsetType(int type) Sets the type of thisRowSetobject to the given type.voidsetTypeMap(Map<String, Class<?>> map) Installs the givenjava.util.Mapobject as the default type map for thisRowSetobject.voidSets the URL thisRowSetobject will use when it uses theDriverManagerto create a connection.voidSets the designated parameter to the givenjava.net.URLvalue.voidsetUsername(String name) Sets the username property for thisRowSetobject to the givenString.Methods declared in interface WebRowSet
readXml, readXml, writeXml, writeXml, writeXml, writeXmlModifier and TypeMethodDescriptionvoidreadXml(InputStream iStream) Reads a stream based XML input to populate thisWebRowSetobject.voidReads aWebRowSetobject in its XML format from the givenReaderobject.voidwriteXml(OutputStream oStream) Writes the data, properties, and metadata for thisWebRowSetobject to the givenOutputStreamobject in XML format.voidWrites the data, properties, and metadata for thisWebRowSetobject to the givenWriterobject in XML format.voidwriteXml(ResultSet rs, OutputStream oStream) Populates thisWebRowSetobject with the contents of the givenResultSetobject and writes its data, properties, and metadata to the givenOutputStreamobject in XML format.voidPopulates thisWebRowSetobject with the contents of the givenResultSetobject and writes its data, properties, and metadata to the givenWriterobject in XML format.Methods declared in interface Wrapper
isWrapperFor, unwrapModifier and TypeMethodDescriptionbooleanisWrapperFor(Class<?> iface) Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.<T> TReturns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
-
Method Details
-
setFilter
Applies the givenPredicateobject to thisFilteredRowSetobject. The filter applies controls both to inbound and outbound views, constraining which rows are visible and which rows can be manipulated.A new
Predicateobject may be set at any time. This has the effect of changing constraints on theRowSetobject's data. In addition, modifying the filter at runtime presents issues whereby multiple components may be operating on oneFilteredRowSetobject. Application developers must take responsibility for managing multiple handles toFilteredRowSetobjects when their underlingPredicateobjects change.- Parameters:
p- aPredicateobject defining the filter for thisFilteredRowSetobject. Setting a null value will clear the predicate, allowing all rows to become visible.- Throws:
SQLException- if an error occurs when setting thePredicateobject
-
getFilter
Predicate getFilter()Retrieves the active filter for thisFilteredRowSetobject.- Returns:
- p the
Predicatefor thisFilteredRowSetobject;nullif no filter has been set.
-