@CollectionDomain

You use the @CollectionDomain to specify the cardinality and the type of collection elements.

Purpose

Specifies the cardinality and the type of collection elements on a member or a parameter where a collection type is used.

Syntax

@CollectionDomain(<see the example>)

Description

The @CollectionDomain provides a collection domain to specify the type of collection elements and the cardinality.

The collection domain and the element type are used by the Business Action Language (BAL).

Example

In the XOM, the annotation can be used as follows:

public class Cart {
@CollectionDomain(elementType = "Item")
public List items;

@CollectionDomain(min = 1, max = 12)
public Person[] passengers; 
}

The result in the BOM is the following code:

class Cart{ 
List items domain 0,* class Item;
Person[] passengers domain 1,12 class Person;
}