Chapter 5 Customizing Generation with GTL


Collection members

Each object can have one or more collections, which contain objects with which it interacts. For example, a table has collections of columns, indexes, business rules and so on.

Collections are represented in the PowerDesigner metamodel (see the Resource Files and the Public Metamodel chapter) by associations between objects, with roles named after the collections.

The available collection members are:

Name Type Description
First Object Returns the first element of the collection
IsEmpty Boolean Used to test whether a collection is empty or not. True if the collection is empty, false otherwise
Count Integer Number of elements in the collection

Note: Count is particularly useful for defining criteria based on collection size, for example (Attributes.Count>=10).

 


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