View Objects are esssential part of ADF Business Components . These are associated with represention of DataSet.
ViewObjects contains a Query which when executed returns a set of results in form of rows. Then the view Object convert the rows returned from the query to ADF undestandable form i.e. ViewObjectRowImpl form.
ViewObject goes through a series of methods before representing a dataset. In other words we can name it ViewObject LifeCycle .
Here is a diagrammatic representation of ViewObject LifeCycle .
ViewObjects contains a Query which when executed returns a set of results in form of rows. Then the view Object convert the rows returned from the query to ADF undestandable form i.e. ViewObjectRowImpl form.
So, the question is what happens when a viewObject gets a call?
ViewObject goes through a series of methods before representing a dataset. In other words we can name it ViewObject LifeCycle .
LifeCycle
When a viewObject is called the following methods are executed in the given sequence.- At first when the viewObject is first executed the method first called in the ViewObjectImpl is
executeQueryForCollection(Object qc, Object[] params, int noUserParams)
This method executes the Database Query in the viewObject and then calls the next method. - After executeQueryForCollection is executed then method hasNextForCollection(Object qc) is called. This method checks if the collection returned have a row or not. If hasNextForCollection(Object qc) returns True then the next method of the lifeCycle is called which converts the row to ADF understandable form i.e. into ViewObjectRowImpl from.
- So when method hasNextForCollection retuns true then method createRowFromResultSet(Object qc, ResultSet resultSet) is called and this method converts the row into ADF understandable form.
- This goes on until all the rows are covered and there is no rows left in collection. When there are no rows in the collection then the method hasNextForCollection returns false .
- Then method setFetchCompleteForCollection(java.lang.Object qc,boolean val) is called and it sets the flag for fetch completion. This indicates that the rows from the collection are fetched.
Here is a diagrammatic representation of ViewObject LifeCycle .
hi aman....could u please guide me how to improve in adf coding corner...that is with simple application done by coding...please mail me if u have free time to reply to this my mail: "shaikrafi.4786@gmail.com"..
ReplyDeleteWaiting for ur valuable suggestions
Thank You