ViewObject Forward Only mode

Hi!

Today I was reading a interesting topic about one of ViewObject tuning properties, it is called Forward Only mode, you can programmatically set it by calling setForwardOnly(true). This property won't allow the ViewObject to cache the previous loaded rows while RowSet scroll is happening.

Link to the documentation: http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#sm0342

Section

39.2.6 Use Forward Only Mode to Avoid Caching View Rows

As stated in documentation:
"Often you will write code that programmatically iterates through the results of a view object. A typical situation will be custom validation code that must process multiple rows of query results to determine whether an attribute or an entity is valid or not. In these cases, if you intend to read each row in the row set a single time and never require scrolling backward or re-iterating the row set a subsequent time, then you can use "forward only" mode to avoid caching the retrieved rows. To enable forward only mode, call setForwardOnly(true) on the view object.

Note:
Using a read-only view object (with no entity usages) in forward-only mode with an appropriately tuned fetch size is the most efficient way to programmatically read data.
You can also use forward-only mode to avoid caching rows when inserting, updating, or deleting data as long as you never scroll backward through the row set and never call reset() to set the iterator back to the first row. Forward only mode only works with a range size of one (1)."



Good to know!

Comentários

Postagens mais visitadas deste blog

Possible reason for JBO-27019 - ADF Bussiness Components

Weird Weblogic deployment exception