SimpleType

open class SimpleType : DataType

Represents a type definition for an underlying basic type.

  • Can this model element be removed by DataService.refreshMetadata. Defaults to false. Set this to true to 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? If `isRemoved == 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
  • Represents an undefined enum type.

    Declaration

    Swift

    public static let undefined: EnumType
  • The local name of this type within its owning DataSchema, e.g. “MyType”.

    Declaration

    Swift

    final public var localName: String
  • The name of this type qualified by its owning DataSchema name, e.g. “MySchema.MyType”.

    Declaration

    Swift

    final public var qualifiedName: String
  • Is this type for client-only use in an offline scenario?

    Declaration

    Swift

    final public var isClientOnly: Bool
  • Source line number for this schema element within its defining schema.

    Declaration

    Swift

    final public var sourceLine: Int
  • Type facets for this type. Can be nil if there are no custom facets.

    Declaration

    Swift

    final public var typeFacets: TypeFacets?
  • true if this type was added since metadata was originally loaded.

    Declaration

    Swift

    final public var isExtension: Bool
  • true if this simple type was inferred due to a missing term definition in the CSDL.

    Declaration

    Swift

    final public var isInferred: Bool
  • true if this item allows Unicode content. If isUnicode is false, then this item only allows ASCII content.

    Declaration

    Swift

    final public var isUnicode: Bool
  • Minimum length for string and binary values.

    See also

    TypeFacets.ANY_LENGTH.

    Declaration

    Swift

    final public var minLength: Int
  • Maximum length for string and binary values.

    See also

    TypeFacets.ANY_LENGTH.

    Declaration

    Swift

    final public var maxLength: Int
  • Precision for decimal and integer values.

    See also

    TypeFacets.ANY_PRECISION.

    Declaration

    Swift

    final public var precision: Int
  • Scale for decimal values.

    See also

    TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.

    Declaration

    Swift

    final public var scale: Int
  • EPSG Spatial Reference System Identifier (SRID) for the associated value.

    See also

    TypeFacets.VARIABLE_SRID.

    Declaration

    Swift

    final public var srid: Int
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Lookup an existing annotation by term name, or throw an exception if the annotation is not found.

    See also

    annotations and AnnotationMap.get, for looking up annotations that might not exist.

    Declaration

    Swift

    open func annotation(withName term: String) -> Annotation

    Parameters

    term

    The 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 }
  • The type code of the underlying type.

    Declaration

    Swift

    override open var code: Int { get }
  • Synonym for baseType.

    Declaration

    Swift

    open var derivedFrom: DataType { get set }
  • true if this item has fixed length for string and binary values.

    See also

    minLength, maxLength.

    Declaration

    Swift

    open var fixedLength: Bool { get }
  • true if this type is a derived simple, complex, entity or enum type.

    Declaration

    Swift

    override open var isDerived: Bool { get }
  • true if this simple type is annotated with allowed values and symbolic names to define an “open” enumeration type.

    See also

    OData Validation.AllowedValue and Core.SymbolicName annotation terms.

    Declaration

    Swift

    open var isOpenEnum: Bool { get }
  • Synonym for qualifiedName.

    Declaration

    Swift

    override open var name: String { get }
  • Declaration

    Swift

    override open func toString() -> String

    Return Value

    The name of this data type.