Generating custom enterprise object classes, Generating custom enterprise object classes 118 – Apple WebObjects 3.5 User Manual
Page 118

Chapter 3
Creating a WebObjects Database Application
118
1. In EOModeler, inspect the Talent entity.
2. In the Entity Inspector for Talent, type
Talent
in the Class field.
3. Set the MovieRole entity’s class to MovieRole.
Now you can generate the source files for your Talent and MovieRole classes.
Generating Custom Enterprise Object Classes
You can easily create a custom class to hold your business logic: EOModeler
provides a command to generate enterprise object classes.
1. In EOModeler, select the Talent entity.
2. Choose Property
m
Generate Java Files.
A Choose Class Name panel opens. If you opened the model file from
Project Builder, the Choose Class Name panel displays the project as the
destination directory and
Talent.java
as the default file name.
3. Ensure that the Movies project directory is selected.
4. Click Save.
A panel opens, asking if you want to insert the file in your project.
5. Click Yes.
EOModeler creates the source file
Talent.java
and adds it to your project.
6. Follow the same procedure for MovieRole.
Type the name of your custom class here.