Sunday, August 28, 2011

JDev/ADF sample - Difference Between Fetched Row Count and Just Row Count

  • Difference Between Fetched Row Count and Just Row Count. While implementing various validation rules in ADF BC, we can call two methods to get number of rows for specific entity - getFetchedRowCount() and getRowCount(). What's the difference between these two and what you should keep in mind? In case if Master-Detail screen is separated into two pages or two fragments - detail entity will be populated and data will be fetched only after this entity will be directly accessed. This means that getFetchedRowCount() returns count for rows already loaded into memory. In contrary, getRowCount() loads rows into memory (if there are no rows loaded) and then returns row count. Both of these methods are good and useful in specific use cases. ADF developer should understand the difference to avoid unexpected behavior.
    Download - ADFMasterDetailImpl.zip

No comments: