In this tutorial we Will how to Create And Use Entity Object For Our Application Before Going to Practical Implementation we Should Know What Is entity Object:So first Step Is to Create ADF Application
Enter Application Name and than click on Finish
Right Click on Model and choose New
From the Business Tire category select ADF Business Components and from items select Business Components from Tables
Create the Connection to the Oracle Database
Query the Database Schema and move the Entities from Available to Selected window. In my case I am moving Department and Employees Entities. Rename the Package model from(for ease to remember)
We can define two types of attribute
a) Control Functionality and behaviour such as Mandatory fields, Default values of the fields and also set the database interaction properties etc.
b) UI Hints – default UI representation such as Label of the fields, Tooltip, Format mask and control types etc
Expand the package and open the Employees entity. Click on Attributes and select the hiredate field from Employees entity. Now we will set the following attributes on the hiredate field.
1) Setting the default date value using the Groovy Expression
2) Setting the Label, Tool Tip, Format Type and Format on hiredate field
Save the Project. Expandpackage, right click on AppModule and choose run.
Oracle ADF provides swing based interface to interact our View Object. Double Click on EmployeesView1 and than click on plus sign to create a record. You will see that the default value of the hiredate date filed, Label is also set as we did. Move the mouse cursor to the hiredate field, Tool Tip will also appear automatically.