EntitySet

open class EntitySet : ObjectBase, BindingPath

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
  • Table type for column-based storage.

    Declaration

    Swift

    public static let columnTable: String
  • Table type for row-based storage.

    Declaration

    Swift

    public static let rowTable: String
  • 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
  • The undefined value for EntitySet.

    Declaration

    Swift

    public static let undefined: EntitySet
  • 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 percent-encoded resourcePath for use in server-generated context URLs.

    Declaration

    Swift

    final public var contextPath: String
  • The percent-encoded resourcePath for use in client-generated request URLs.

    Declaration

    Swift

    final public var encodedPath: 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
  • Is this set for client-only use in an offline scenario?

    Declaration

    Swift

    final public var isClientOnly: Bool
  • True if draftSet names another entity set having isLocalDraft of true.

    Declaration

    Swift

    final public var hasLocalDraft: Bool
  • Is this set for local draft use in an offline scenario?

    Declaration

    Swift

    final public var isLocalDraft: Bool
  • If isLocalDraft is true, then the name of the corresponding active (non-draft) entity set. Otherwise empty. Otherwise localName.

    Declaration

    Swift

    final public var activeSet: String
  • If another entity set has isLocalDraft of true, and the activeSet of that draft entity set refers to this entity set, then the name of draft entity set. Otherwise localName.

    Declaration

    Swift

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

    Declaration

    Swift

    final public var isExtension: Bool
  • true if a client for this entity set should use OpenAPI compatibility.

    Declaration

    Swift

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

    Declaration

    Swift

    final public var sourceLine: Int
  • Does this entity set represent an OData singleton entity?

    Declaration

    Swift

    final public var isSingleton: Bool
  • Was this entity set synthesized to support service implementation?

    Declaration

    Swift

    final public var isSynthesized: Bool
  • Secondary indexes to be created in the database.

    Declaration

    Swift

    final public var indexes: EntitySet.IndexList
  • Database table for this entity set.

    Declaration

    Swift

    final public var table: String?
  • For internal use.

    Declaration

    Swift

    final public var tablePrefix: String?
  • Database table type for this entity set. If unset, the default table type depends on the target database.

    See also

    #constants) (COLUMN_TABLE, ROW_TABLE).

    Declaration

    Swift

    final public var tableType: String?
  • Schema that contains the table.

    Declaration

    Swift

    final public var schema: String?
  • 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

    final public var isSystem: Bool
  • Does this entity set require a generated primary key.

    Declaration

    Swift

    final public var generatedKey: Bool
  • Name of key generator sequence (if generatedKey is true).

    Declaration

    Swift

    final public var keyGenerator: String?
  • Set to true to enable change tracking for this entity set. Defaults to false.

    Declaration

    Swift

    final public var trackChanges: Bool
  • Set to true to enable download tracking for this entity set. Defaults to false.

    Declaration

    Swift

    final public var trackDownloads: Bool
  • Should the affected row count for local deletes be checked, to ensure that each expected deleted row was actually deleted? Defaults to true.

    Declaration

    Swift

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

    Declaration

    Swift

    final public var checkUpdates: Bool
  • Should entities be reselected after create, to ensure that database-generated column values will be available afterwards? Defaults to true.

    Declaration

    Swift

    final public var selectAfterCreate: Bool
  • Should entities be reselected after update, to ensure that database-generated column values will be available afterwards? Defaults to true.

    Declaration

    Swift

    final public var selectAfterUpdate: Bool
  • Does this entity set have an error state column?

    Declaration

    Swift

    final public var hasOfflineState: Bool
  • Does this entity set have an offline key column?

    Declaration

    Swift

    final public var hasOfflineKey: Bool
  • Does this entity set have a backend etag column?

    Declaration

    Swift

    final public var hasBackendETag: Bool
  • Does this entity set have a row version column?

    Declaration

    Swift

    final public var hasVersionColumn: Bool
  • Is this entity set imported from an existing SQL database table?

    Declaration

    Swift

    final public var isImportedFromSQL: Bool
  • 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 }
  • Lookup an existing navigation property binding by name.

    See also

    pathBindings and EntitySetMap.get, 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.

  • List of default selection items for this entity set.

    Declaration

    Swift

    @inline(__always)
    public final var defaultSelect: SelectItemList { get }
  • The number of entities in each persistence batch during download. Defaults to 100.

    Declaration

    Swift

    @inline(__always)
    public final var downloadBatchSize: Int { get set }
  • For offline scenarios, should entities in this entity set be downloaded by default? Defaults to true.

    Declaration

    Swift

    @inline(__always)
    public final var downloadEntitiesByDefault: Bool { get set }
  • For offline scenarios, can separate download queries for this entity set have overlapping results? Defaults to false.

    Declaration

    Swift

    @inline(__always)
    public final var downloadQueriesCanOverlap: Bool { get set }
  • For offline scenarios, should streams in this entity set be downloaded by default? Defaults to true.

    Declaration

    Swift

    @inline(__always)
    public final var downloadStreamsByDefault: Bool { get set }
  • For offline scenarios, will the client ignore a delta links in responses to change tracking queries for this entity set? Defaults to false.

    Declaration

    Swift

    @inline(__always)
    public final var downloadWithoutDeltaLinks: Bool { get set }
  • Entity type for entities in this set.

    Declaration

    Swift

    public final var entityType: EntityType { get set }
  • An estimate of the time in seconds for delta download of this entity set. Setting this property may aid in determination of OperationProgress.estimatedTimeRemaining.

    Declaration

    Swift

    @inline(__always)
    public final var estimatedDeltaDownloadTime: Double? { get set }
  • An estimate of the time in seconds for initial download of this entity set. Setting this property may aid in determination of OperationProgress.estimatedTimeRemaining.

    Declaration

    Swift

    @inline(__always)
    public final var estimatedInitialDownloadTime: Double? { get set }
  • An estimate of the time in seconds for stream download of a media entity. Setting this property may aid in determination of OperationProgress.estimatedTimeRemaining.

    Declaration

    Swift

    @inline(__always)
    public final var estimatedStreamDownloadTime: Double? { get set }
  • Force failure to save downloaded changed entities for this entity set (for testing only).

    Declaration

    Swift

    @inline(__always)
    public final var failBeforeSavingAnyEntity: Bool { get set }
  • Force failure to save downloaded delta links for this entity set (for testing only).

    Declaration

    Swift

    @inline(__always)
    public final var failBeforeSavingDeltaLink: Bool { get set }
  • Is this entity set downloadable?

    Declaration

    Swift

    open var isDownloadable: Bool { get set }
  • Was this entity set synthesized to support containment target?

    Declaration

    Swift

    open var isSynthesizedTarget: Bool { get set }
  • Is this entity set uploadable?

    Declaration

    Swift

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

    Declaration

    Swift

    @inline(__always)
    public final var metrics: EntitySetMetrics { get }
  • Synonym for qualifiedName.

    Declaration

    Swift

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

    Declaration

    Swift

    @inline(__always)
    public final var pathBindings: EntitySetMap { get }
  • The name of this set as it should be referenced in resource paths before any percent-encoding (e.g. localName for OData V4, qualifiedName for OData V2).

    Declaration

    Swift

    open var resourcePath: String { get set }
  • 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.

  • The upload group for use in synchronization. Upload groups are used for selection of a subset of entity sets to upload.

    See also

    CloudSyncProvider.upload (groups parameter).

    Declaration

    Swift

    @inline(__always)
    public final var uploadGroup: String? { get set }
  • Metadata for an index on the containing entity set.

    See more

    Declaration

    Swift

    open class Index : ObjectBase
  • A list of item type EntitySet$Index.

    See more

    Declaration

    Swift

    open class IndexList : ListBase, Sequence