Simple types
The common-base facility provides platform-neutral simple types. They are model elements supplied by the facility, not hard-coded primitive tokens in the CMN grammar.
1. Types provided by common-base in 1.3.80
AnyStringIntegerLongDecimalBooleanDateTimeTimestampBinaryId,Name, andTextas semantic specializations ofString
2. Custom simple types
cmn
type<string> CurrencyCode
type CustomerNumber specialization of String maxLength=30<string> applies the Base string stereotype. specialization of derives a new simple type from an existing type.
3. Constants and fixed value sets
cmn
const DEFAULT_LANGUAGE = 'EN'
enum LanguageCode {
EN
DE
}Use const for a named value and enum for a fixed set of alternatives.
4. Type arguments and properties
Facility-defined types can accept positional arguments. For example, String(200) sets the maxLength argument declared by the Base String type:
cmn
type Address {
street*: String(200)
}Available arguments and properties are defined by the selected platform and its imported facilities.
