EntityType
open class EntityType : StructureType, @unchecked Sendable
Encapsulates the metadata of an OData entity type.
-
Represents an undefined entity type.
Declaration
Swift
public static let undefined: EntityType -
The abstract base type Edm.EntityType.
Declaration
Swift
public static let abstractBase: EntityType -
If
hasSubtypesistrue, then the list of subtypes. Otherwisenil.Declaration
Swift
final public var subtypes: EntityTypeList? -
trueif one or more ofkeyPropertieshave aProperty.hasKeyPathvalue oftrue.Declaration
Swift
final public var hasKeyPaths: Bool -
trueif this entity type is a media resource (has stream content).Declaration
Swift
final public var isMedia: Bool -
List of key properties for this type.
Declaration
Swift
final public var keyProperties: PropertyList -
Names of columns (or properties) that are permitted for database-level full-text searching. If not specified, will be lazily initialized as a list of all string-typed properties.
Declaration
Swift
final public var searchColumns: StringList -
The number of entity sets using this entity type.
Declaration
Swift
final public var countSets: Int -
The number of local draft entity sets using this entity type.
Declaration
Swift
final public var draftSets: Int -
Default initializer.
Declaration
Swift
override public init() -
DataType.ENTITY_VALUEDeclaration
Swift
override open var code: Int { get } -
trueif this entity type is a parent of one or more derived entity types.Declaration
Swift
override open var hasSubtypes: Bool { get } -
trueif this entity type is a subtype of a parent entity type.Declaration
Swift
override open var hasSupertype: Bool { get } -
Declaration
Swift
open func inheritsFrom(other: EntityType) -> BoolParameters
otherOther entity type.
Return Value
trueif this entity type inherits fromother. -
Lookup a required key property by name.
See also
keyProperties.Declaration
Swift
open func keyProperty(name: String) -> PropertyParameters
nameName of the property.
Return Value
The property metadata.
-
Pseudo-property for media content (media entities only).
See also
isMedia.Declaration
Swift
public final var mediaProperty: StreamProperty { get set } -
Set the
objectFactoryfor this entity type.Declaration
Swift
open func registerFactory(_ factory: ObjectFactory)Parameters
factoryCustom factory to produce
EntityValueinstances of this type. -
If
hasSupertypeistrue, then the parent entity type. Otherwisenil.Declaration
Swift
open var supertype: EntityType? { get set } -
Declaration
Swift
override open func toString() -> StringReturn Value
The name of this data type.
-
Set the
objectFactoryfor this entity type.Declaration
Swift
open func withFactory(_ factory: ObjectFactory) -> EntityTypeParameters
factoryCustom factory to produce
EntityValueinstances of this type.Return Value
This entity type.