Working With a Range of Data

You can work tith a range of data to retrieve only a small subset of data at a time. The view object cache only stores rows to the end of the range.

To work with a range of data:

  1. Set the range by calling setRangeSize() on the view object instance. For example, to work with ten rows at a time in the view object instance mgrVO, you would use the following code:

    mgrVO.setRangeSize(10);

  2. To retrieve a row from the range, pass the index (starting with 0) for the row within the range to getRowAtRangeIndex(). For example, to retrieve the fifth row in the current range, you would use the following code:

    Row currRow=mgrVO.getRowAtRangeIndex(4);

  3. To set the view object's current row pointer to that row, call setCurrentRow():

    mgrVO.setcurrRow(currRow);

  4. To scroll the range forward or backward, pass an offset to scrollRange(). For example, the following scrolls the range so that it contains the 21st through 30th rows, and then scrolls backwards so that the range contains the 11th through 20th rows:
    mgrVO.scrollRange(20);
    mgrVO.scrollRange(-10);                
  5. When you care done working with the range, pass -1 into setRangeSize():

    mgrVO.setRangeSize(-1);


Ways to Navigate Through Query Results
Tuning Business Components
About Oracle ADF View Objects
Finding View Object Instances in the Data Model

 

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.