Class Properties

To view or edit a class's properties, double-click its diagram symbol or Browser or list entry. The property sheet tabs and fields listed here are those available by default, before any customization of the interface by you or an administrator.

The General tab contains the following properties:

Property

Description

Name/Code/Comment

Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. You can optionally add a comment to provide more detailed information about the object. By default the code is generated from the name by applying the naming conventions specified in the model options. To decouple name-code synchronization, click to release the = button to the right of the Code field.

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. You can enter a stereotype directly in this field, or add stereotypes to the list by specifying them in an extension file.

The following common stereotypes are available by default:
  • <<actor>> - Coherent set of roles that users play

  • <<enumeration>> - List of named values used as the range of an attribute type

  • <<exception>> - Exception class, mainly used in relation to error messages

  • <<implementationClass>> - Class whose instances are statically typed. Defines the physical data structure and methods of a class as implemented in traditional programming languages

  • <<process>> - Heavyweight flow that executes concurrently with other processes

  • <<signal>> - Specification of asynchronous stimulus between instances

  • <<metaclass>> - a metaclass of some other class

  • <<powertype>> - a metaclass whose instances are sub-classes of another class

  • <<thread>> - Lightweight flow that executes concurrently with other threads within the same process. Usually executes inside the address space of an enclosing process

  • <<type>> - Abstract class used to specify the structure and behavior of a set of objects but not the implementation

  • <<utility>> - Class that has no instances

Other language-specific stereotypes may be available if they are specified in the object language file (see Customizing and Extending PowerDesigner > Extension Files > Stereotypes (Profile)).

Visibility

Specifies the visibility of the object, how it is seen outside its enclosing namespace. When a class is visible to another object, it may influence the structure or behavior of the object, and/or be affected by it. You can choose between:
  • Private – only to the object itself

  • Protected – only to the object and its inherited objects

  • Package – to all objects contained within the same package

  • Public – to all objects (option by default)

Cardinality

Specifies the number of instances a class can have. You can choose between:
  • 0..1 – None to one

  • 0..* – None to an unlimited number

  • 1..1 – One to one

  • 1..* – One to an unlimited number

  • * – Unlimited number

Type

Allows you to specify that a class is a generic type, or that it is bound to one. You can choose between:
  • Class

  • Generic

  • Bound – an additional list is displayed, which lets you specify the generic type to which the class is bound. Use the tools to the right of the list to create, browse for, or view the properties of the currently selected type.

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.

Keywords

Provide a way of loosely grouping objects through tagging. To enter multiple keywords, separate them with commas.

Detail Tab

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:
  • Generate table - the class is generated as an entity or table.

  • Migrate columns – [PDM only] the class is not generated, and its attributes and associations are migrated to the generated parent or child table.

  • Generate ADT – [PDM only] the class is generated as an abstract data type (see Data Modeling > Building Data Models > Physical Diagrams > Abstract Data Types).

  • Value Type – the class is not generated, and its attributes are generated in their referencing types.

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

The following tabs are also available:
  • 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 Core Features Guide > The PowerDesigner Interface > Diagrams, Matrices, and Symbols > Diagrams > Specifying Diagrams as Related Diagrams).

  • Script - lets you customize the class creation script (see Customizing Object Creation Scripts)

  • Preview - lets you view the code to be generated for the class (see Previewing OOM Code)