findByViewCriteria
RowIterator findByViewCriteria(ViewCriteria criteria, int maxNumOfRows, int queryMode)
-
Finds and returns View rows that match the specified View Criteria. See
ViewCriteria
for details on how to build and use a View Criteria.The
queryMode
parameter controls the manner in which the qualifying View rows are searched. See theQUERY_MODE_...
constants inViewObject
for different contants that can be specified (they can be OR'ed together).If
QUERY_MODE_SCAN_VIEW_ROWS
is specified, the existing View rows in the current Row Set are scanned for matching rows.If
QUERY_MODE_SCAN_ENTITY_ROWS
is 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_TABLES
is 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).
-