ADF chapter 3 summary

Getting Started
The important  notes are:

  1. Generic VS strong typed API:
  • generic is to use only one method that accepts column name as string
  • strongly typed is to use getter method for the attribute or column name
Example
Row row = ordersVO.getCurrentRow();
Date shippedDate = (Date)row.getAttribute("OrderShippedDate");

OrdersRow row = (OrdersRow)ordersVO.getCurrentRow();
Date shippedDate = row.getOrderShippedDate();

2. interfaces accessible for the client:
1- Application Module
2- View objects, representing the query components
3-View rows, representing each row in a given query component's results

3-Custom Client Interfaces for Components
you can create your own custom interface that contains your custom business services required to be exposed to some clients.
so, you can create your java class that extends the super interface . for example

  • StoreServiceAM extends ApplicationModule : Custom application module interface
  • OrderItemsInfo extends ViewObject :            Custom view object interface
  • OrderItemsInfoRowClient extends Row   :       Custom view row interface

4- Overview of Groovy Support
     Groovy is:

  1. scripting language
  2. Java-like syntax
  3. executed at runtime
  4. strongly typed language
     used for :

  1. Define an Script Expression validator or Compare validator
  2. Define error message tokens for handling validation failure
  3. Handle conditional execution of validators
  4. Set the default value of a bind variable in the view object query statement criteria statement
  5. Define the default value for an entity object attribute
  6. Calculate the value of a transient attribute of an entity object or view object
adf object


There is one top-level object named adf that allows you access to objects that the
framework makes available to the Groovy script

  1. adf.context - to reference the ADFContext object
  2. adf.object - to reference the object on which the expression is being applied
  3. all attributes in Entity objects
  4. all attributes in View Objects
  5. Bind variable in view objects:
  6. Bind variable in view accessors:
  7. Transient attributes:
  8. adf.error - in validation rules, to access the error handler
  9. adf.userSession - returns a reference to the ADF Business Components user session
  10. adf.currentDate
  11. adf.currentDateTime
  12. newValue: in an attribute-level validator, to access the attribute value being set
  13. oldValue: in an attribute-level validator, to access the current value

Comments

Popular posts from this blog

Another user has changed the row with primary key oracle.jbo.Key[12 ].

Working With File Throgh WebUtill

Reading From File