First page Back Continue Last page Text

oracle adf workshop


Using Query Results Programmatically

The ViewObject interface in the oracle.jbo package provides the methods to make quick work of any data-retrieval task.

Most of the time you work with only a single row set of results at a time for a view object, with a single iterator. The view object contains a default RowSet, which in turn contains a default RowSetIterator. The default RowSetIterator enables you to call the following methods directly on the ViewObject component itself, knowing that they apply automatically to its default row set:

executeQuery( ): Executes the view object’s query and populates its row set of results

setWhereClause(): Adds a dynamic predicate at run time to narrow a search

setNamedWhereClauseParam(): Sets the value of a named bind variable

hasNext(): Tests whether the row set iterator has reached the last row of results

next(): Advances the row set iterator to the next row in the row set

getEstimatedRowCount(): Counts the number of rows a view object’s query would return