Operation Properties

To view or edit an operation'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

Parent

Specifies the parent classifier to which the operation 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.

The following common stereotypes are available by default:
  • <<constructor>> - Operation called during the instantiation of an objet that creates an instance of a class

  • <<create>> - Operation used by a class when instantiating an object

  • <<destroy>> - Operation used by a class that destroys an instance of a class

  • <<storedProcedure>> - Operation will become a stored procedure in the generated PDM

  • <<storedFunction>> - Operation will become a stored function in the generated PDM

  • <<EJBCreateMethod>> - EJB specific CreateMethod

  • <<EJBFinderMethod>> - EJB specific FinderMethod

  • <<EJBSelectMethod>> - EJB specific SelectMethod

For more information on EJB specific methods, see Defining Operations for EJBs.

Return Type

A list of values returned by a call of the operation. If none are returned, the return type value is null

Visibility

[class operators] Visibility of the operation, whose value denotes how it is seen outside its enclosing name space:
  • 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

Language event

When classes represent elements of interfaces, this box allows you to show an operation as triggered by a significant occurrence of an event

Static

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

Array

Flag defining the return type of the operation. It is true if the value returned is a table

Abstract

The operation cannot be instantiated and thus has no direct instances

Final

The operation cannot be redefined

Read-only

Operation whose execution does not change the class instance

Web service method

If displayed and selected, implies that the operation is used as a web service method

Influent object

Specifies the operation on which the current operation is based. In general, this is either a parent operation that is being overridden through a generalization link or an interface operation that is being implemented though a realization link.

Generic

Specifies that the operation is a generic method (see Generic Types and Methods).

Keywords

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

Parameters Tab

The Parameters tab lists the parameters of your operation. Each parameter is a variable that can be changed, passed, or returned. A parameter has the following properties:

Property

Description

Parent

Specifies the operation to which the parameter 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.

Data type

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

Array

When selected, turns attributes into table format

Array size

Specifies an accurate array size when the attribute multiplicity is greater than 1.

Variable Argument

Specifies that the method can take a variable number of parameters for a given argument. You can only select this property if the parameter is the last in the list.

Parameter Type

Direction of information flow for the parameter. Indicates what is returned when the parameter is called by the operation during the execution process. You can choose from the following:
  • In - Input parameter passed by value. The final value may not be modified and information is not available to the caller

  • In/Out - Input parameter that may be modified. The final value may be modified to communicate information to the caller

  • Out - Output parameter. The final value may be modified to communicate information to the caller

Default value

Default value when a parameter is omitted. For example:

Use an operation oper(string param1, integer param2), and specify two arguments oper(val1, val2) during invocation. Some languages, like C++, allow you to define a default value that is then memorized when the parameter is omitted during invocation.

If the declaration of the method is oper(string param1, integer param2 = default), then the invocation oper(val1) is similar to oper(val1, default).

WSDL data type

Only available with Web services. Defines the XML-Schema/SOAP type used during invocation of a Web method (using http or Soap)

Keywords

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

Implementation Tab

The Implementation tab allows you to specify the code that will be used to implement the operation, and contains the following sub-tabs at the bottom of the dialog:

Items

Description

Body

Code of the implementation.

Exceptions

Signal raised in response to behavioral faults during system execution. Use the Add Exception tool to select an exception classifier to add at the cursor position.

Pre-conditions

Constraint that must be true when the operation is invoked.

Post-conditions

Constraints that must be true at the completion of the operation.

Specification

Similar to the pseudo code, it is a description of the normal sequence of actions.

The following tabs are also available:

  • Parameters - lists the parameters of the operation. Each parameter is a variable that can be changed, passed, or returned (see Parameters (OOM)).

  • Generic Parameters - lets you specify the type parameters of a generic method (see Generic Types and Methods).

  • Related Diagrams - lists and lets you add model diagrams that are related to the operation (see Core Features Guide > The PowerDesigner Interface > Diagrams, Matrices, and Symbols > Diagrams > Specifying Diagrams as Related Diagrams).