Monday 18 November 2013

POST-QUERY in ADF

The POST-QUERY in ADF is very simple to implement and it is much documented both in the official Oracle Documentation and in various ADF Blogs and Forums.
In my blog I discuss often about the relation between Form Builder and ADF, so I think that a post about POST-QUERY is very important to write.
So, here the implementation:

Open the Model Project and implement the ViewObjectImpl class of your ViewObject.xml (in my example called MyViewObject.xml) as shown:



Now override the method "createRowFromResultSet":


    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
      ViewRowImpl value = super.createRowFromResultSet(qc, resultSet);
      if(value != null){
        <<YOUR POST-QUERY CODE of the row "value">>
      }
      return value;
    }

That's all.
Easy and fast!

2 comments: