Creating an Entity Object

The Entity Object Wizard lets you create an entity object. The entity object can be based on an existing table (reverse generation) or be used to create a database table (forward generation).

Alternatively, you can create default entity objects, based on existing database tables, in the Business Components Project Wizard and Package Wizard or Editor.

To create an entity object with the Entity Object Wizard:

  1. While the business components project is open, either:

    The Entity Object Wizard appears.

  2. If the Welcome page appears, click Next.

  3. In the Name page, specify the name and package and optionally the table of the entity object. Then click Next.

  4. In the Attributes page, specify entity attributes. Then click Next.

    For reverse generation, remove attributes you want to exclude and define new attributes that are not based on a table. For forward generation, define attributes and change the attribute order (which is the order of the columns in the table).

  5. In the Attributes Settings page, specify settings for each attribute. Then click Next.

    In general, if you are performing reverse generation, you don't want to change the primary key, mandatory, database column name, column type, and unique settings that were received from the table. For forward generation, the primary key, mandatory, persistent, database column name, column type, and unique settings are used to generate tables.

  6. In the Java page, specify which Java source files and methods you want to generate, if any. Then click Next.

    You want to generate source files if you need to customize Java code.

  7. In the Finish page, optionally create a default view object containing the attributes you specified in the entity object. Then click Finish to generate the entity object.

    You can edit the entity object in the Entity Object Editor. If you created a default view object, you can edit it in the View Object Editor.


Related topics
Ways to Create Entity Objects and Associations
Preparing for Reverse Generation
Preparing for Forward Generation
About the Development Process
About Generating Entity Objects, Associations, and Database Tables
What Is an Entity Object?
What Is an Entity Attribute?
Business Component Data Types