Wednesday, February 9, 2011

View Object Data Management Configuration



normally this is how I configure my ViewObjects
  1. updatable access through entity objects
    • for maintenance screens. This is good enough for simple CRUD operations.
    • requires you to create EntityObjects which acts as an interface to the DB. When an EntityObject is configured to a ViewObject, changes you make in the VO data/attributes would be reflected in the database.
  2. via SQL query with read only access
    • used when an SQL call can completely represent the data you need. One good thing about the ViewObject wizard is that when you configure the SQL query - it automatically maps the result set columns to the corresponding Java class/object attributes. (though I'm not sure with queries that have *)
    • note that you can have multiple subqueries and even call PLSQL functions
  3. programmatic data population
    • I use this with modules that need complex data manipulation and requires me to use PLSQL procedures and functions. (Prolly my favorite type @w@;;) A Cursor/ResultSet to ViewObject mapper method would be handy in this case (a sample source code is given in the OAF documentation)
    • even Java alone can utilize this type of ViewObject
TBC

No comments:

Post a Comment