beautypg.com

Apple WebObjects 3.5 User Manual

Page 70

background image

Chapter 3

Creating a WebObjects Database Application

70

3. Uncheck the “Ask about stored procedures” box.

Checking this box causes the wizard to read stored procedures from the
database’s schema information, display them, and allow you to choose
which to include in your model. Because the Movies application doesn’t
require the use of any stored procedures, don’t check this box.

4. Uncheck the “Use custom enterprise objects” box.

An entity maps a table to enterprise objects by storing the name of a
database table (MOVIE, for example) and the name of the corresponding
enterprise object class (a Java class, Movie, for example). When deciding
what class to map a table to, you have two choices: GenericRecord or a
custom class. GenericRecord is a class whose instances store key-value
pairs that correspond to an entity’s properties and the data associated with
each property.

If you don’t check the “Use custom enterprise objects” box, the wizard
maps all your database tables to GenericRecord. If you do check this box,
the wizard maps all your database tables to custom classes. The wizard
assumes that each entity is to be represented by a custom class with the
same name. For example, a table named MOVIE has an entity named
Movie, whose corresponding custom class is also named Movie.

Use a custom enterprise object class only when you need to add business
logic; otherwise use GenericRecord. The Movies application uses
GenericRecord for the Movie entity and custom classes for the Talent and
MovieRole entities. Later on, you’ll use EOModeler to specify the custom
classes.

5. Click Next.