Specifying the Name, Package, and Table of an Entity Object

While creating an entity object with the Entity Object Wizard, you specify the following information in the Name page. How you use this page depends on whether you are performing reverse or forward generation, or extending an existing entity object.

Field

Description

Name

Type the name of the entity object, which can be the same as a table name, or different if, for example, the table name doesn't adequately reflect what you're using the entity object for or you want to use a different language.

To use a default name based on the table, first select an object in the Select object list.

Package

Type the package the entity object should be placed in. Click Browse to select an existing package.

Extends Entity

(Optional) Type the name of an existing entity object you want to extend. Click Browse to select it from a dialog. (The entity object must extend directly or indirectly from oracle.jbo.server.EntityImpl.) This is a useful feature if you want to provide additional functionality or extend a previously created entity object that you don't have the source for. See Extending an Existing Entity Object.

Database Objects

For reverse generation, specify the database table (or view, synonym, or snapshot) used to create an entity object, as well as associations, which are based on joins already in these tables.

For forward generation, do not specify a database table.

Database Schema

Select a schema from the dropdown list. Its schema objects will appear in the Select object list.

Tables, Views, Synonyms, Snapshots

Select a checkbox to include the item in the Select object list. Deselect it to exclude these objects.

Select object, Schema Object

In the Select object list, select the schema object you want to base the entity object on. (If you haven't yet typed a name in the Name field, selecting an object adds a default name.) Or, in the Schema Object field, type the name of the object. If the schema contains a lot of tables, it may be easier to type the name rather than find it in the list.

To specify name, package, and table information for reverse generation:

  1. Choose a schema from the Database Schema dropdown list.

  2. Select the information you want to appear in the Select object list, any combination of Tables, Views, Synonyms, and Snapshots.

  3. In the Select object list, select the object that you want to base the entity object on. Or, type a name in the Schema Object field.

  4. In the Name field, optionally change the entity object name.

  5. In the Package field, you can accept the default package where the object will reside, or you can choose another package by typing the name or clicking Browse.

  6. Click Next.

To specify name and package information for forward generation:

  1. In the Name field, type the entity object name.

  2. In the Package field, you can accept the default package where the object will reside, or you can choose another package by typing the name or clicking Browse.

  3. Click Next.

To extend an existing entity object:

  1. In the Extends Entity field, click Browse to select an entity object in your project to extend.

  2. If you will forward generate a table for the extended entity object to use, do not change anything in the Database Object fields. If you will reverse generate the extended entity object from a table you have extended, select the table:

    1. Choose a schema from the Database Schema dropdown list.

    2. Select the information you want to appear in the Select object list, any combination of Tables, Views, Synonyms, and Snapshots.

    3. In the Select object list, select the object that you want to base the entity object on. Or, type a name in the Schema Object field.

  3. In the Name field, optionally change the entity object name.

  4. In the Package field, you can accept the default package where the object will reside, or you can choose another package by typing the name or clicking Browse.

  5. Click Next.