findByViewCriteria
RowIterator findByViewCriteria(ViewCriteria criteria, int maxNumOfRows, int queryMode)
-
Finds and returns View rows that match the specified View Criteria. See
ViewCriteriafor details on how to build and use a View Criteria.The
queryModeparameter controls the manner in which the qualifying View rows are searched. See theQUERY_MODE_...constants inViewObjectfor different contants that can be specified (they can be OR'ed together).If
QUERY_MODE_SCAN_VIEW_ROWSis specified, the existing View rows in the current Row Set are scanned for matching rows.If
QUERY_MODE_SCAN_ENTITY_ROWSis specified, the Entity cache is searched for qualifying rows. If qualifying rows are found, they are added to the current Row Set. I.e., they become part of the current row collection. Internally, a finder View Object is created to search the Entity cache and to produce View rows from the Entity cache.If
QUERY_MODE_SCAN_DATABASE_TABLESis specified, a database query is issued to find matching rows. The View Criteria is converted into a where-clause.ViewObject.applyViewCriteria(ViewCriteria)on the finder View Object is invoked and the query executed.Upon completion of this operation, the finder View Object is closed and removed.
-
-
Parameters:
-
criteria- the View Criteria to be used to qualify View rows. -
maxNumOfRows- the maximum size of the array to return, or -1 to return all rows. If a value other than -1 is specified and if the specified number of rows is reached, the method returns without performing any further operation. -
queryMode- the mode in which qualify View rows are scanned. See above for further info.
Returns:
- a RowSet (parented by the same View Object as this RowIterator) that contains qualifying rows. For convenience, this RowSet's range size is initialized to -1 (all rows).
-
findByViewCriteria详解
本文介绍了如何使用findByViewCriteria方法来查找符合特定ViewCriteria标准的视图行。详细解释了通过不同查询模式(如扫描视图行、实体行及数据库表)进行搜索的过程,并概述了方法的参数与返回值。
1140

被折叠的 条评论
为什么被折叠?



