MyViewObjectImpl:
Programmatic View Object
The
class inherits basic ADF behavior from oracle.jbo.server.ViewObjectImpl class and is responsible for managing programmatic data
collection.
For
that, it overrides data source methods, they are:
-
executeQueryForCollection()
-
hasNextForCollection()
-
createRowFromResultSet()
-
getQueryHitCount()
1st
method - executeQueryForCollection() - is the most important, because it performs all actions needed for receiving results of the
query by mean of WSDS client.
Preparing
request to WSDS client, the method takes from ADF all necessary properties that define the expected rowset. Here are the
request parameters and appropriate ADF methods
used:
-
query SQL statement
is constructed from getQuery(),
getWhereClause(), getOrderByClause() mtds
-
query parameters - are taken
from the method arguments
-
number of rows in range -
returned by getMaxFetchSize() method
-
jdbc fetch size for WSDS -
the value from getFetchSize()
In
return, the method gets from WSDS client:
-
total count of rows in the query
-
two-dimensional array of values representing requested rowset used as new programmatic data collection
For further fulfilling its model functions, the new class
overrides row manipulation methods -
insertRow() and removeCurrentRow() - which results should be reflected in programmatic data
collection.
ADF Developer's Guide contains detailed description for
programmatic view object in the
chapter "27.8 Using Programmatic View Objects for Alternative Data Sources".