Monday, February 25, 2013

Difference Between getAllRowsInRange and getRowAtRangeIndex

We can retrieve the rows of an VO by 2 methods

Example 1
   oracle.jbo.Row rows[] = getdataVo.getAllRowsInRange();
 for (int i = 0; i < rows.Lengthi++)
{
   GetDataVORowImpl cafConfigVORow = (GetDataVORowImpl)rows(i);
}

Example 2
for (int i = 0; i < getDataVo.getRowCount(); i++)
{
    GetDataVORowImpl cafConfigVORow = (GetDataVORowImpl)getDataVo.getRowAtRangeIndex(i);
}


The difference betwen both is the first one will get records of first page only whereas the second example will retrieve all records.

No comments: