Attribute Properties

To view or edit an attribute's properties, double-click its 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

Parent

Specifies the classifier to which the attribute belongs.

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.

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.

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, or similarly, the other object can affect the properties of the class. You can choose between:
  • Private – only to the class to which it belongs

  • Protected – only to the class and its derived objects

  • Package – to all objects contained within the same package

  • Public – to all objects (option by default)

Data type

Set of instances sharing the same operations, abstract attributes, relationships, and semantics.

Multiplicity

Specifies the range of allowable number of values the attribute may hold. You can choose between:
  • 0..1 – zero or one

  • 0..* – zero to unlimited

  • 1..1 – exactly one

  • 1..* – one to unlimited

  • * – none to unlimited

You can change the default format of multiplicity from the registry.
HKEY_CURRENT_USER\Software\Sybase\PowerDesigner 16\ModelOptions\Cld\
MultiplicityNotation = 1 (0..1) or 2 (0,1)

Array size

Specifies multiplicity in the syntax of a given language, when attribute multiplicity cannot express it. For example, you can set array size to [4,6,8] to get the PowerBuilder syntax int n[4,6,8] or set array size to [,,] to get the c# syntax int[,,] n;

Depending on the model language, the following will be generated:
  • Java, C# and C++ – [2][4][6]

  • PowerBuilder – [2,4,6]

  • VB .NET – (2,4,6)

Enum class

[Java 5.0 and higher] Specifies an anonymous class for an EnumConstant. Use the tools to the right of the field to create, browse for, or view the properties of the currently selected class.

Static

The attribute is associated with the class, as a consequence, static attributes are shared by all instances of the class and have always the same value among instances.

Derived

Indicates that the attribute can be computed from another attribute. The derivation formula can be defined in the attribute description tab, it does not influence code generation.

Mandatory

Boolean calculated attribute selected if the minimum multiplicity is greater than 0.

Volatile

Indicates that the attribute is not a member of the class. It is only defined by getter and setter operations, in C# it replaces the former extended attribute volatile. For more information on adding operations to a class, see Adding Getter and Setter Operations to a Classifier.

Keywords

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

Detail Tab

The Detail tab contains the following properties:

Property

Description

Initial value

Specifies the intial value assigned to the attribute on creation.

Changeability

Specifies if the value of the attribute can be modified once the object has been initialized. You can choose between:
  • Changeable – The value can be changed

  • Read-only – Prevents the creation of a setter operation (a setter is created in the method inside the class)

  • Frozen – Constant

  • Add-only – Allows you to add a new value only

Domain

Specifies a domain (see Domains (OOM)), which will define the data type and related data characteristics for the attribute and may also indicate check parameters, and business rules.

Select a domain from the list, or click the Ellipsis button to the right to create a new domain in the List of Domains.

Primary Identifier

[class attributes] Specifies that the attribute is part of a primary identifier. Primary identifiers are converted to primary keys after generation of an OOM to a PDM. Exists only in classes

Migrated from

Contains the association name that is at the origin of creation of the attribute. Click the Properties tool to the right of the field to open the association property sheet.

For more information on migrating attributes, see Migrating Association Roles in a Class Diagram.

Persistent

[class attributes] Specifies that the attribute will be persisted and stored in a database (see Managing Object Persistence During OOM to PDM Generation).

Code

Specifies the code of the table or entity that will be generated in a persistent CDM or PDM model.

Data type

Specifies a persistent data type used in the generation of a persistent model, either CDM or PDM. The persistent data type is defined from default PowerDesigner conceptual data types.

Length

Specifies the maximum number of characters of the persistent data type.

Precision

Specifies the number of places after the decimal point, for persistent data type values that can take a decimal point

Overrides

[PowerBuilder only] Indicates which parent attribute the current attribute is overriding through a generalization link