Creating a Data, Conceptual or Variant entity is as simple as dragging one of these entity shapes from the Document Stencil onto the model diagram:
|
|
|
Data Entity |
Conceptual Entity |
Variant Entity |
Alternatively, right-click on an empty part of the diagram and choose the appropriate Create option from the menu.
An appropriate dialog will be displayed, allowing you to specify entity details. For example, the following dialog would be displayed for creating a data entity:
Regardless of the type of entity, it must be given a name. This can be up to 20 characters in length, of mixed case, and should be a unique name within the model.
For Data and Variant entities, which are implemented in the repository as files, a physical file name may be optionally specified. This will be the name of the physical file in the repository when the entity is built. The file name can be up to 10 characters in length if your Visual LANSA installation has the *RPGIV generation option turned on (refer to the Visual LANSA User Guide for more information). If it is turned off, the file name can be up to 8 characters in length.
Note that if a physical file name of more than the maximum length allowed is specified, relationship and user view logical view names must be specified manually. For more information about specifying physical file names, refer to 5.5.2 About Entity Physical and Logical File Names, below.
A physical file name cannot be specified for a Conceptual entity.
Note that, at this point, the entry of a physical file name is optional – it is not required for the purposes of constructing the data model. However, it must be specified when building the entity. A physical file name can be entered using the Change facility. If no physical file name is specified when building the entity, a build error will be generated.
Press the OK button or Enter key to create the entity. The entity shape will be updated with the entity name. Note that the shape can now be moved anywhere on the diagram.
Press the Cancel button or Escape key if you do not wish to create the entity. The entity shape will be deleted from the diagram.