You can modify an object's properties from its property sheet. To open a class property sheet, double-click its diagram symbol or its Browser entry in the Classes folder. The following sections detail the property sheet tabs that contain the properties most commonly entered for classes.
The General tab contains the following properties:
Property |
Description |
---|---|
Name |
Specifies the name of the item, which should be clear and meaningful, and should convey the item's purpose to non-technical users. |
Code |
Specifies the technical name of the object, which is used for generating code or scripts. |
Comment |
Descriptive comment for the object. |
Extends |
Specifies the parent class (to which the present class is linked by a generalization). Click the Select Classifier tool to the right to specify a parent class and click the Properties tool to access its property sheet. |
Stereotype |
Extends the semantics of the object beyond the core UML definition. The following common stereotypes are available by default:
Other language-specific stereotypes may be available if they are specified in the object language file (see "Stereotypes (Profile)" in Chapter 2, DBMS Resource File Reference in Customizing and Extending PowerDesigner . |
Visibility |
|
Cardinality |
|
Type |
Allows you to specify that a class is a generic type, or that it is bound to one. You can choose between:
If you specify either Generic or Bound, then the Generic tab is displayed, allowing you to control the associated type variables. For more information on generic types and binding classes to them, see Generic Types and Methods. |
Abstract |
Specifies that the class cannot be instantiated and therefore has no direct instances. |
Final |
Specifies that the class cannot have any inherited objects. |
Generate code |
Specifies that the class is included when you generate code from the model, it does not affect inter-model generation. |
The Detail tab contains a Persistent groupbox whose purpose is to define the persistent generated code of a class during OOM to CDM or PDM generation, and which contains the following properties:
Property |
Description |
---|---|
Persistent |
Specifies that the class must be persisted in a generated CDM or PDM. You have to select one of the following options:
For more information, see Managing Object Persistence During OOM to PDM Generation. |
Code |
Specifies the code of the table or entity that will be generated from the current class in a CDM or PDM model. Persistent codes are used for round-trip engineering: the same class always generates the same entity or table with a code compliant with the target DBMS. Example: to generate a class Purchaser into a table PURCH, type PURCH in the Code box. |
Inner to |
Specifies the name of the class or interface to which the current class belongs as an inner classifier |
Association class |
Specifies the name of the association related to the class to form an association class. The attributes and operations of the current class are used to complement the definition of the association. |
For information about additional properties available if the class is a Web service implementation class, see Web Service Implementation Class Properties
Attributes - lists and lets you add or create attributes (including accessors) associated with the class (see Attributes (OOM)). Click the Inherited button to review the public and protected attributes inherited from a parent class.
Identifiers - lists and lets you create identifiers associated with the class (see Identifiers (OOM)).
Operations - lists and lets you add or create operations associated with the class (see Operations (OOM)).
Generic - lets you specify the type parameters of a generic class or values for the required type parameters for a class that is bound to a generic type (see Generic Types and Methods
Ports - lists and lets you create ports associated with the class (see Ports (OOM)).
Parts - lists and lets you create parts associated with the class (see Parts (OOM)).
Associations - lists and lets you create associations associated with the class (see Associations (OOM)).
Inner Classifiers - lists and lets you create inner classes and interfaces associated with the class (see Composite and Inner Classifiers).
Related Diagrams - lists and lets you add model diagrams that are related to the class (see "Specifying Diagrams as Related Diagrams" in Chapter 5, Diagrams, Matrices, and Symbols in the Core Features Guide.
Script - lets you customize the class creation script (see Customizing Object Creation Scripts)