Creating Master-Detail Relationships Between Lists of Entity Facades

Once you create a pair of EJB finder view objects, you can implement a master-detail relationship between them by creating an EJB finder view link.

Warning: You cannot create am EJB finder view link that expresses the same relationship as a CMR.

To create an EJB finder view link:

  1. Edit the detail view object to ensure that it uses the correct finder method.

    The finder method for the detail view object must accept the foreign key attributes as parameters. For example, if EmployeesView is the detail view object, and DepartmentId is the foreign key attribute that links it to the master, EmployeesView should use a finder (such as findByDepartment_id()) that accepts DepartmentId as a parameter.
  2. In the the Navigator, right-click the package node and choose New EJB Finder View Link to open the EJB Finder View Link Wizard. If you need assistance with the wizard, click Help .

Related topics
Developing Enterprise Java Beans
Understanding Entity Bean Data Bindings
About EJB Finder View Link
Creating a Facade for Entity Bean Data Binding
Creating a List of Entity Facades Based on a Finder Method

Creating a Session Facade to Organize Entity Facades

 

 

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.