normally this is how I configure my ViewObjects
- 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.
- 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
- 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
No comments:
Post a Comment