Databases Reference
In-Depth Information
Learning about APIs
Unil now, we have seen the declaraive power of ADF business components. Now we will
see its programming capabiliies and how ADF can leverage complex business scenarios
using the Java API.
From all of the ADF components available, only the enity object, view object, and
applicaion module will allow the user to generate and extend the Java API. Every
class created for the business components will extend the parent class, which will
take care of the logic of an enire complex framework.
Generating an entity implementation class
Generaing a Java API for a business component is a straighforward task. Most of the ime,
the user is given an opion to generate the Java API while creaing the enity object, view
object, or an applicaion module. If the user skips this step, we can add the API for the
business components from the Java tab.
Java classes in entity objects
An enity object will allow you to generate three types of Java classes. Each of these APIs
is separated to handle and maintain diferent secions of the enity object within the
framework. The three classes are as follows:
Enity object : This class will have all the methods that represent the database rows.
The atributes in this class represent columns in the database table.
Enity collecion : This class will be used to cache the queried rows for the
EntityImpl class.
Enity deiniion : This class will have the metadata deiniion of an enity object class.
Time for action - generating a Java API for DeptEO
In our previous exercise, we did not select the opions to generate the Java API in Create
Component Wizard . The following steps will show how to generate a Java API for the
EmpEO.xml file:
1. Select the EmpEO.xml file from the Model project in the Projects pane.
 
Search WWH ::




Custom Search