You can create your enterprise object classes in either Objective-C or Java. To create an Objective-C class, use Property Generate Obj-C Files. To create a Java class, use Property Generate Java Files.
Additionally, there's a Property Generate Client Java Files. This command generates a Java class for use in the client-side of a Java Client web application.
Each command is described in more detail in the following sections.
EOModeler only permits you to create source files for entities for which you have specified a custom enterprise object class. In other words, you can't generate source files for EOGenericRecord.
EOModeler displays a Choose Class Name panel. If the model file is in a project, the Choose Class Name panel displays the project as the default destination.
If you don't supply a name, the source files are named after the enterprise object class for which they are being generated and are given the appropriate extensions.
If you opened the model file from a project, an additional panel appears, confirming that you want to insert the files in your project.
Also, if you generate source files for an entity and files of the same name already exist, a panel is displayed asking if you want to cancel, overwrite, or merge the files. If you choose merge, the File Merge application starts with the old and new files displayed. You can then merge the files.
NSString *category;Note that:
NSCalendarDate *dateReleased;
NSDecimalNumber *language;
NSString *posterName;
NSDecimalNumber *revenue;
NSString *title;
id plotSummary;
Studio *studio;
NSMutableArray *directors;
NSMutableArray *roles;
- (void)setTitle:(NSString *)value
{
[self willChange];
[title autorelease];
title = [value retain];
}
- (NSString *)title { return title; }
Using this and one of the other two source generation commands (either Objective-C or Java), you can create two versions of your enterprise object class. The different versions can have different class properties. For example, for security reasons, you might want to include social security number attribute in the server-side version of an enterprise object but exclude it from the client-side version.
To enable this distinction, you can specify whether an attribute is a Class Property () to be included in the server-side enterprise objects and also whether an attribute is a Client-Side Class Property () to be included in the client-side objects. For more information on setting these characteristics, see the chapter Working with Attributes.
To generate a Java (.java) file for a client-side version of your enterprise object class, follow the steps in Generating Objective-C Source Files, except that you choose Property Generate Client Java Files.
Table of Contents Next Section