Step through a view object instance's result set by calling the view
object's previous()
method. This method decrements the view
object instance's current row pointer and then returns the new current
row.
Before calling previous()
, you should call
hasPrevious()
to make sure the view object instance's pointer is
not on its first row.
The following example uses previous()
to step backwards
through the view object instance mgrVO
, starting at the row
currRow
, and sum the salaries of all of the managers earlier in the
view object instance's result set:
int sumSal = 0;
while (mgrVO.hasPrevious())
{
currRow = mgrVO.previous();
sumSal += currRow.getAttribute("Salary").intValue();
}
Ways to Navigate Through Query Results
About Oracle ADF View Objects
Finding View
Object Instances in the Data Model
Retrieving Attribute Values
Copyright © 1997, 2004, Oracle. All rights reserved.