Chapter 4 Managing Profiles


Defining a Criterion

Criteria are another and more generic extension mechanism for the PowerDesigner metaclasses.

A criterion defines a condition with the expressions used in the .if macro of the PowerDesigner generation template language (GTL). You can also use the extended attributes defined at the metaclass level in the criterion condition, but you cannot use those defined in the criterion itself.

You can define sub-criteria under a parent criterion, the Parent list lets you specify the name of the parent criterion.

When a metaclass instance verifies the criterion condition, the extensions defined on the criterion are applied to this instance. In case of sub-criterion, both sub-criterion and criterion conditions must be verified for the extensions to be applied to the instance.

For more information on the PowerDesigner generation template language and the .if macro, see the "Generation Reference Guide" chapter.

You define one or several criteria for a selected metaclass. Criteria let you define the same extensions as stereotypes.

Example

In a PDM, you want to customize the symbols of fact tables. You can create a criterion called "fact_type" that will test the type of the table using the following condition:

(%DimensionalType%) == "1"

DimensionalType is an attribute of BaseTable object. It has a set of defined values among which 1 corresponds to the fact dimensional types. You can view this attribute in the Table section of the PdPDM library in the PowerDesigner scripting objects help (pdvbs10.chm).

And then you define a custom symbol for this criterion.

For more information on custom symbols, see the "Defining a Custom Symbol in a Profile" section.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.