Time for action – creating an association between EmpEO and DeptEO objects
Carry out the
following steps to create an association between EmpEO
and DeptEO
objects:
Select the New option from the File menu and select ADF Business Component from the Business Tier.
Enter the package name as
com.empdirectory.model.association
and the name asEmpEOToDeptEOAssoc
in the Create Association wizard. The package structure for all these business objects can be predefined from the Tools | Preferences | ADF Business Components | Packages section.Click on the Next > button to create an association between the entity objects. Select the value of Cardinality as
* to 1
from the drop-down menu to represent the many-to-one relationship betweenEmpEO
andDeptEO
.Note
The reason for setting the relations as many-to-one is to represent that many Employee entities are available in a single Department entity. Department is a single entity that represents the collection of employees in it.
Locate the
Deptno
attribute...