public interface FilteredRowSet extends WebRowSet
FilteredRowSet
所有标准的实现必须实现的标准接口。的
FilteredRowSetImpl
类提供了参考实现可扩展的需要。另外,一个供应商可以自由地实现自己的版本,通过实施这个接口。
RowSet
对象需要提供一定程度的过滤内容。一个可能的解决方案是所有标准
RowSet
实现提供一种查询语言;然而,这是轻量级的组件如断线的
RowSet
对象不切实际的方法。的
FilteredRowSet
界面旨在满足这一需求而提供一个重量级的查询语言随着处理这样的查询语言要求。
JDBC FilteredRowSet
标准贯彻实施RowSet
接口和扩展CachedRowSet
™类。的CachedRowSet
类提供了一套保护光标操作方法,这一FilteredRowSet
实现可以重写提供过滤支持。
FilteredRowSet
使用继承的方法实现
createShared
母接口共享,要共享的
Predicate
无所有
FilteredRowSet
克隆改造实例。
通过实施Predicate
(在Predicate类Javadoc见例子),一个FilteredRowSet
又可以描述如下。
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
在上面的例子中,我们初始化一个
Range
对象实施
Predicate
接口。该对象表示以下约束:所有行输出或从
FilteredRowSet
对象修改必须下降值α和“Bravo”价值观之间的包容性,在列的列名”。如果过滤器被应用到一个
FilteredRowSet
对象不包含数据,属于过滤范围,不返回任何行。
该框架允许多个类实现谓词组合使用,以实现所需的过滤结果与查询语言处理的需要。
FilteredRowSet
对象FilteredRowSet
对象的谓词应用在
RowSet
对象管理
RowSet
对象中的行的子集的所有行的标准。此标准管理是可见的行的子集,也定义可以修改、删除或插入的行的子集。
因此,谓语放在FilteredRowSet
对象必须被视为门控机制的所有视图和更新的FilteredRowSet
对象双向和设定的标准。任何试图更新FilteredRowSet
违反准则将导致被SQLException
对象。
的FilteredRowSet
范围准则可以随时到FilteredRowSet
实例应用新Predicate
对象修改。如果没有额外的引用对象的FilteredRowSet
检测这是可能的。一个新的过滤器有立竿见影的效果,对规范执法FilteredRowSet
对象内,和随后的所有观点和更新将受到类似的执法。
FilteredRowSet
对象不能被修改直到过滤器是除去或应用一个新的过滤器外。
此外,只有在过滤器的范围内下降的行将与数据源同步。
PUBLIC_XML_SCHEMA, SCHEMA_SYSTEM_ID
COMMIT_ON_ACCEPT_CHANGES
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_SENSITIVE
Modifier and Type | Method and Description |
---|---|
Predicate |
getFilter()
检索此
FilteredRowSet 对象的有源滤波器。
|
void |
setFilter(Predicate p)
适用于给定的
Predicate 反对这
FilteredRowSet 对象。
|
readXml, readXml, writeXml, writeXml, writeXml, writeXml
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, undoUpdate
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, setUsername
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, wasNull
isWrapperFor, unwrap
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn
void setFilter(Predicate p) throws SQLException
Predicate
反对这
FilteredRowSet
对象。该过滤器将控件应用于对入站和出站视图的控件,约束哪些行是可见的,哪些行可以被操纵。
一个新的Predicate
对象可以在任何时间。这改变了约束的RowSet
对象的数据的影响。此外,在运行时修改了多个组件过滤问题可能是一FilteredRowSet
对象操作。应用程序开发人员必须管理多个处理FilteredRowSet
对象当下属Predicate
对象变化的责任。
p
-
Predicate
对象定义这个
FilteredRowSet
对象过滤器。设置一个
价值将清楚谓语,让所有行变得可见。
SQLException
-如果出现错误设置
Predicate
对象时
Predicate getFilter()
FilteredRowSet
对象的有源滤波器。
FilteredRowSet
对象的
Predicate
;
null
如果没有过滤器已定。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.