Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with iterating viewobject rows

Ajay G M-OracleMay 13 2011 — edited May 13 2011
Hi ,
I am applying an view criteria to a VO and trying to loop through the result row using below code.
When I use the getEstimatedRowCount() of the VO, i get the row count as 3. However when i loop through the vo, the last row returns null.

long rowCount = voDestinSearch.getEstimatedRowCount();
System.out.println(rowCount);
voDestinSearch.reset();

for (int count = 0; count <rowCount;count++){
if(rowCount==0){
searchRow = voDestinSearch.first();
}else{
searchRow = voDestinSearch.next();
}
if(searchRow != null){
al.add(searchRow);
}
}

Thanks
Ajay
This post has been answered by Timo Hahn on May 13 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 10 2011
Added on May 13 2011
2 comments
254 views