This method estimates the number of rows in the row count by calling
For example:
Note however, that this method might not be as accurate as getRowCount(). To test whether the View Object has read all the rows from the cursor, you can use getEstimatedRowCount() in conjunction with getFetchedRowCount(). For example, getEstimatedRowCount() returns an equivalent of count(*) on the View Object. The
Source: http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#getEstimatedRowCount__
getQueryHitCount
(which performs a SELECT COUNT (*) FROM table). Internal logic in Business Components for Java keeps the EstimatedRowCount up-to-date as rows are inserted and removed. Thus, after the first call to this method, it can return the estimated count quickly.For example:
// Get the rowcount again because of deleted or inserted row
rowCount = (int) iter.getRowSet().getEstimatedRowCount();If you are working with a large number of rows, or if your application demands a fast response, use this method instead of
getRowCount
.Note however, that this method might not be as accurate as getRowCount(). To test whether the View Object has read all the rows from the cursor, you can use getEstimatedRowCount() in conjunction with getFetchedRowCount(). For example, getEstimatedRowCount() returns an equivalent of count(*) on the View Object. The
getFetchedRowCount
method returns the count of rows already fetched. If getFetchedRowCount() returns a value less than getEstimatedRowCount(), then the View Object has not read all rows from the cursor.Source: http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#getEstimatedRowCount__