Previous Topic: Defining the Attributes for the Task Entity

Next Topic: Owned By Relationships

Defining the Task Entity

You define the Task entity by adding triples so that Task inherits a user interface and database functionality from class library objects.

To define the Task entity:

PLEX--Defining the Task Entity (1)

  1. Refresh both the Model Editor and Object Browser, and click the Entity button on the Object Browser if entities are not already showing.

    Notice that the Task and Employee entities are both visible in the Object Browser.

  2. Drag the Task entity from the Object Browser to the body of the Model Editor. The Model Editor should look like this:

    PLEX--Defining the Task Entity (2)

    These are the triples that CA Plex added to your model when you created the diagram in the preceding lesson.

  3. Add the following triples:

    Task is a OBASE/Grid Maintained Entity

    You created this same triple for the Project entity. For more information, see Add Functionality to the Project Entity in the chapter "Defining Entities." It gives Task basic user interface and database functionality.

  4. Add the following triple:

    OBASE/Child

    This triple gives Task special processing based on its relationship with its owning entity, Project. You used the Diagrammer to define the triple, Task owned by Project, which describes the relationship between the entities. For more information, see Defining Relationships Between Entities in the chapter "Diagramming Entity Relationships." The Task is a OBASE/Child inheritance triple provides the Task entity with cascade delete functionality. This functionality causes all tasks owned by a project to be deleted when the owning project is deleted.

  5. Select the Task is a OBASE/Child triple in the Model Editor by clicking in the center column.

PLEX--Defining the Task Entity (5)

  1. Click the Editor button on the toolbar. The Template Editor appears.

    You use this dialog to specify the owner of an entity that inherits from OBASE/Child.

    Defining the Task Entity

  2. Click in the right-most column, and enter Project.
  3. Close the Template Editor. Click Yes to save your changes.
  4. Refresh the Model Editor. Notice that CA Plex added the following triple:

    Task replaces OBASE/Parent
    ...by Project

    This reflects the change you made in the Template Editor. The second line (...by Project) is called a continuation triple.

    The indentation and ellipsis before the continuation verb indicate that the triple qualifies or modifies the triple above it.