OAF remove all rows from view object VO

849 Views Asked by At

I can not find a method to make the VO empty.

In collections it's rather straight-forward

arrayList.clear();

But there's no similar method in VO.

1

There are 1 best solutions below

0
On BEST ANSWER

There are no normal method names because VO can have many row sets. For example, you can put query results with different parameters in different row sets and then work with both of them. VO is actually a list of lists, so all VO methods are named differently.

One-liner solution

vo.executeEmptyRowSet();

If you need to handle each row individually

vo.reset();
while (vo.hasNext()) {
    oracle.jbo.Row row = vo.next()
    handleRow(row);
    row.remove();
}