Enumerations

An Enumeration is a data type that can contain a list of values. An Enumeration contains a set of named identifiers, called Enumeration Literals, that represent the values of the enumeration.

An enumeration can be a generalization of Primitive Type Object if it is not a String enumeration.

You must set up the generalization, and you must have created the Primitive Type object to generalize from.

In the example below, a Primitive Type of the Decimal data type has been created. There is also an Enumeration called Analgesics, containing enumeration literals. You create a generalization from the Enumeration to the Primitive type. In this example, this would create an Analgesics enumeration with decimal literals.

Generalizations of the following data types are not supported: Attachment, Boolean, Duration, ID, Object, URI.

Warning: An Enumeration extending another Enumeration can contain only a subset of the enumeration literals defined in the parent Enumeration(s): for example, an Enumeration "Shape" (RED,BLUE) extending Enumeration "Color" (RED,BLUE, SILVER,GREEN). Shape is treated as a restriction in Business Data Services rather than an extension. Therefore, if at runtime you pass a value "SILVER" for the Shape enumeration, a failure occurs.