Adding Behavior to Your Enterprise Objects
Right now, the Movies application maps all its entities to the EOGenericRecord class. As the preceding sections illustrate, you can go quite far in an application using just this default enterprise object class, but now you need to add some custom classes to the Movies application. In this section, you'll learn how to:-
Generate source code for a custom enterprise object class.
-
Provide default values in a custom enterprise object class.
You'll create custom classes for the Talent and MovieRole entities. In the Talent class, you'll write a fullName method that concatenates a Talent's first and last names. You'll use the method to populate MovieDetail's browser element. In the MovieRole class, you'll provide default values for newly inserted MovieRoles so they don't show up in the list of movie roles as a blank line.
Specifying Custom Enterprise Object Classes
Generating Custom Enterprise Object Classes
Adding Custom Behavior to Talent
Providing Default Values in MovieRole
Running Movies
© 1999 Apple Computer, Inc. (Last Updated 24 Aug 99)