Creating an EO
Creating an EO:-
- To create an EO right click on the Model
project -> New -> Select Entity Object (Under ADF Business Components
under Business Tier Category) -> Click on OK.
- Select the connection created by you and
click on OK.
- On clicking OK an Entity creation wizard will
be opened, which will help you to create the EO or Entity Object.
- Give the package name as “model.entity” (Why?
You can refer to the ADF Business component naming standard).
- Name as EmployeeEO (as we are going to create
an Entity Object based on Employees table present in HR schema).
- Under Schema
Object, click on browse to select the EMPLOYEES table.
- Select the EMPLOYEES from the available
objects and click on OK. You can also create the EO based on Views, Synonyms
and Materialized Views.
- Then click on Next, to go to the step 2 of
the Entity Creation wizard.
- Select the EMPLOYEES from the available
objects and click on OK. You can also create the EO based on Views, Synonyms
and Materialized Views.
- Then click on Next, to go to the step 2 of
the Entity Creation wizard.
- Step 2 of the wizard shows all the attributes
that you are going to add to the entity object.
- You can add a new attribute to the
entity which is known as transient attribute based on your requirement.
- In step 3 of the wizard you can change the attribute type,
default values and lot more. Keep this settings as it is, we will discuss it
later.
- In step 4 of the wizard you can generate various java classes for
entity objects. For now we are less bother about it, so keep the fields as it
is
- Step 5 of the wizard allows you to create View object
and Application module directly. We can do this by checking the Generate
Default View Object check box and Add to Application Module check box, But for
a beginner you should know how to create a View object and Application Module,
so don’t check the check boxes.
- Step 6 is a summary of entity object you are
going to create. Just review it and click on Finish to complete the entity
creation wizard.
- You have created your first entity object, named
as EmployeeEO. You can see it under Model project present in Application
Navigator palette as shown.
- It automatically creates an association as it
has relation with manger id with the same table.
No comments:
Post a Comment