DataMethod

open class DataMethod: ObjectBase

Encapsulates the metadata of an OData function or action.

  • 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 = false
  • 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 = false
  • The local name of this method within its owning EntityContainer, e.g. MyAction.

    Declaration

    Swift

    final public var localName: String = ""
  • The name of this method qualified by its owning EntityContainer name, e.g. MyContainer.MyAction. The Entity container prefix is omitted for the default entity container in the outermost schema.

    Declaration

    Swift

    final public var qualifiedName: String = ""
  • The name of this method as it should be referenced in resource paths.

    Declaration

    Swift

    final public var resourcePath: String = ""
  • The name of this method qualified by its owning DataSchema and EntityContainer names, e.g. MySchema.MyContainer/MyAction.

    Declaration

    Swift

    final public var targetPath: String = ""
  • Qualified name of the associated unbound method. For OData V4+ ActionImport, this is the name of the corresponding Action. For OData V4+ FunctionImport, this is the name of the corresponding Function. Otherwise nil.

    Declaration

    Swift

    final public var unboundMethod: String?
  • The bound name of this method after its binding parameter’s type, e.g. MySchema.MyEntityType.MyAction. If isBound is false, then equal to qualifiedName.

    Declaration

    Swift

    final public var boundName: String = ""
  • true if this method was added since metadata was originally loaded.

    Declaration

    Swift

    final public var isExtension: Bool = false
  • Entity set bound to this method, or nil if the method is not bound to an entity set.

    Declaration

    Swift

    final public var entitySet: EntitySet?
  • HTTP Method (e.g. GET, POST) for this data method.

    Declaration

    Swift

    final public var httpMethod: String?
  • Return type for this method.

    Declaration

    Swift

    final public var returnType: DataType!
  • Formal parameters for this method.

    Declaration

    Swift

    final public var parameters: ParameterList!
  • Is this an ActionImport/FunctionImport (as opposed to an Action/Function)?

    Declaration

    Swift

    final public var isImported: Bool = false
  • true if this method is a function, which is not permitted to change entity state.

    Declaration

    Swift

    final public var isFunction: Bool = false
  • true if this method is an action, which is permitted to change entity state.

    Declaration

    Swift

    final public var isAction: Bool = false
  • Is this method bound to a value when it is applied?

    Declaration

    Swift

    final public var isBound: Bool = false
  • Is this method composable with another method?

    Declaration

    Swift

    final public var isComposable: Bool = false
  • 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 = true
  • Minimum length for string and binary values.

    See also

    TypeFacets.ANY_LENGTH.

    Declaration

    Swift

    final public var minLength: Int = (0 as Int)
  • Maximum length for string and binary values.

    See also

    TypeFacets.ANY_LENGTH.

    Declaration

    Swift

    final public var maxLength: Int = (0 as Int)
  • Precision for decimal and integer values.

    See also

    TypeFacets.ANY_PRECISION.

    Declaration

    Swift

    final public var precision: Int = (0 as Int)
  • Scale for decimal values.

    See also

    TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.

    Declaration

    Swift

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

    See also

    TypeFacets.VARIABLE_SRID.

    Declaration

    Swift

    final public var srid: Int = (0 as Int)
  • true if this item is nullable.

    Declaration

    Swift

    final public var isOptional: Bool = true
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Lookup a method annotation by term name.

    See also

    annotationMap, 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 method annotation.

  • List of annotations for this property.

    Declaration

    Swift

    open var annotationList: AnnotationList
  • Map of annotations for this property.

    Declaration

    Swift

    open var annotationMap: AnnotationMap
  • true if this item has fixed length for string and binary values.

    See also

    minLength, maxLength.

    Declaration

    Swift

    open var fixedLength: Bool
  • Synonym for resourcePath.

    Declaration

    Swift

    open var importedName: String
  • Is this method overloaded?

    Declaration

    Swift

    open var isOverloaded: Bool
  • Metrics for runtime use of this data method.

    Declaration

    Swift

    open var metrics: DataMethodMetrics
  • Synonym for qualifiedName.

    Declaration

    Swift

    open var name: String
  • List of overloads of this function. If this list contains only one item, the method is not overloaded.

    Declaration

    Swift

    open var overloadList: DataMethodList
  • Map of overloads of this function. If this list contains only one entry, the method is not overloaded.

    Declaration

    Swift

    open var overloadMap: DataMethodMap
  • Declaration

    Swift

    override open func toString() -> String

    Return Value

    A string representation of this object.

  • Parameter/return type signature for this method.

    Declaration

    Swift

    open var typeSignature: String