EntitySet

open class EntitySet: ObjectBase

Encapsulates the metadata of an OData entity set. Also used for OData isSingleton entities.

See also

DataService.createEntity, DataService.updateEntity, DataService.deleteEntity, DataService.getEntity, DataService.getEntityList.
  • Special value for table to indicate that this entity set should not be stored in the database.

    Declaration

    Swift

    public static let noTable: String = "none"
  • 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 undefined value for EntitySet.

    Declaration

    Swift

    public static let undefined: EntitySet = EntitySet._new1_in_EntitySet("UNKNOWN", "UNKNOWN", EntityType.undefined, "UNKNOWN")
  • The local name of this set within its owning EntityContainer, e.g. MyEntitySet.

    Declaration

    Swift

    final public var localName: String = ""
  • The name of this set qualified by its owning EntityContainer name, e.g. MyContainer.MyEntitySet. 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 set as it should be referenced in resource paths (e.g. localName for OData V4, qualifiedName for OData V2).

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    final public var isExtension: Bool = false
  • Entity type for entities in this set.

    Declaration

    Swift

    final public var entityType: EntityType!
  • Does this entity set represent an OData singleton entity?

    Declaration

    Swift

    final public var isSingleton: Bool = false
  • Database table for this entity set.

    Declaration

    Swift

    final public var table: String?
  • Should the affected row count for local deletes be checked, to ensure that each expected deleted row was actually deleted?

    Declaration

    Swift

    final public var checkDeletes: Bool = true
  • Should the affected row count for local updates be checked, to ensure that each expected updated row was actually updated?

    Declaration

    Swift

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

    Declaration

    Swift

    override public init()
  • Lookup an existing set 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 set annotation.

  • List of annotations for this set.

    Declaration

    Swift

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

    Declaration

    Swift

    open var annotationMap: AnnotationMap
  • Lookup an existing navigation property binding by name.

    See also

    pathBindings, for looking up bindings that might not exist..

    Declaration

    Swift

    open func binding(withName name: String) -> EntitySet

    Parameters

    name

    Name of the property.

    Return Value

    The bound entity set.

  • Which download group does this entity set belong to?

    Declaration

    Swift

    open var downloadGroup: String?
  • A custom download query for use in synchronization. If this is not set, all entities in the entity set will be downloaded.

    Declaration

    Swift

    open var downloadQuery: DataQuery?
  • Is this entity downloadable?

    Declaration

    Swift

    open var isDownloadable: Bool
  • Is this a local entity set? A local entity set exists only in the local database (for application use), not the backend system.

    Declaration

    Swift

    open var isLocal: Bool
  • Is this a system entity set? A system entity set exists only in the local database (for internal use), not the backend system.

    Declaration

    Swift

    open var isSystem: Bool
  • Is this entity uploadable?

    Declaration

    Swift

    open var isUploadable: Bool
  • Metrics for runtime use of this entity set.

    Declaration

    Swift

    open var metrics: EntitySetMetrics
  • Synonym for qualifiedName.

    Declaration

    Swift

    open var name: String
  • Map of bindings from navigation properties to entity sets.

    Declaration

    Swift

    open var pathBindings: EntitySetMap
  • Declaration

    Swift

    override open func toString() -> String

    Return Value

    A string representation of this object.

  • Declaration

    Swift

    open class func undefinedIfNull(entitySet: EntitySet?) -> EntitySet

    Parameters

    entitySet

    Entity set, or nil.

    Return Value

    undefined if entitySet is nil, otherwise return entitySet.