EnumValue
open class EnumValue : DataValue, @unchecked Sendable
Encapsulates an OData enum value.
-
Can this model element be removed by
DataService.refreshMetadata. Defaults tofalse. Set this totrueto indicate that the application is coded to be able able to function correctly without this model element.See also
isRemoved.Declaration
Swift
final public var canBeRemoved: Bool -
Has this model element been removed by a successful call to
DataService.refreshMetadata? IfisRemoved== true, that implies that the old metadata (before refreshMetadata was called) did include this model element, and that the new metadata (after refreshMetadata was called) does not include this model element.See also
canBeRemoved.Declaration
Swift
final public var isRemoved: Bool -
True if this member was added since metadata was originally loaded.
Declaration
Swift
final public var isExtension: Bool -
Source line number for this schema element within its defining schema.
Declaration
Swift
final public var sourceLine: Int -
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
Declaration
Swift
open func annotation(withName term: String) -> AnnotationParameters
termThe term name.
Return Value
The annotation.
-
Obsolete. Use
annotations.Declaration
Swift
open var annotationList: AnnotationList { get } -
Obsolete. Use
annotations.Declaration
Swift
open var annotationMap: AnnotationMap { get } -
Map of annotations for this model element. For annotations without qualifiers, the entry key is the annotation term name. For annotations with qualifiers, the entry key is the annotation term name, then “#”, then the annotation qualifier.
Declaration
Swift
open var annotations: AnnotationMap { get } -
Declaration
Swift
open func byteValue() -> IntReturn Value
The numeric value of this enum value as a byte.
-
Compare two wrapped values for ordering.
Declaration
Swift
open class func compare(x: EnumValue, y: EnumValue) -> IntParameters
xFirst object for comparison.
ySecond object for comparison.
Return Value
-1 if
x.value < y.value, 0 ifx.value == y.value, or 1 ifx.value > y.value. -
Declaration
Swift
override open func copyMutable() -> DataValueReturn Value
A clone of this value if it (together with all value subcomponents) is possibly mutable, or return
selfvalue if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query. -
Data type with a
DataType.codeofDataType.ENUM_VALUE.Declaration
Swift
override open var dataType: DataType { get } -
Compare two wrapped values for equality.
Declaration
Swift
open class func equal(x: EnumValue?, y: EnumValue?) -> BoolParameters
xFirst object for comparison.
ySecond object for comparison.
Return Value
trueifx.value == y.valueor if both arguments arenil, otherwisefalse. -
Declaration
Swift
open func intValue() -> IntReturn Value
The numeric value of this enum value as an int.
-
Label for this enumeration member. Defaults to
name, but can be modified, e.g. during UI initialization.Declaration
Swift
open var label: String { get set } -
Declaration
Swift
open func longValue() -> Int64Return Value
The numeric value of this enum value as a long.
-
Name of this enumeration member.
Declaration
Swift
open var name: String { get } -
Declaration
Swift
open func shortValue() -> IntReturn Value
The numeric value of this enum value as a short.
-
Declaration
Swift
open func stringValue() -> StringReturn Value
This enum value as a string.
-
Convert this data value to a string. If the
dataTypeis defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).Declaration
Swift
override open func toString() -> StringReturn Value
Lexical representation of this data value.
-
The numeric value of this enum value as a ByteValue, ShortValue, IntValue, LongValue, UnsignedByte, UnsignedShort or StringValue (depending on the enum type’s underlying type).
Declaration
Swift
open var value: DataValue { get }