Entity

open class Entity : Object, Persistable
extension Entity: Mappable

Base class for entity classes that are mapped to a collection in Kinvey.

  • Key

    Property names for the Entity class

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Deprecated in version 3.17.0. Please use Entity.CodingKeys instead")
    public struct Key
  • This function can be used to validate JSON prior to mapping. Return nil to cancel mapping at this point

    Declaration

    Swift

    @available(*, deprecated, message: "Deprecated in version 3.18.0. Please use Swift.Codable instead")
    public required init?(map: Map)
  • Override this method and return the name of the collection for Kinvey.

    Declaration

    Swift

    open class func collectionName() throws -> String
  • Declaration

    Swift

    open class func translate(property: String) throws -> String?
  • The _id property mapped in the Kinvey backend.

    Declaration

    Swift

    @objc
    public dynamic var entityId: String?
  • The _kmd property mapped in the Kinvey backend.

    Declaration

    Swift

    @objc
    public dynamic var metadata: Metadata?
  • acl

    The _acl property mapped in the Kinvey backend.

    Declaration

    Swift

    @objc
    public dynamic var acl: Acl?
  • Default Constructor.

    Declaration

    Swift

    public required override init()
  • Undocumented

    Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Undocumented

    Declaration

    Swift

    open func encode(to encoder: Encoder) throws
  • Override this method to tell how to map your own objects.

    Declaration

    Swift

    @available(*, deprecated, message: "Deprecated in version 3.18.0. Please use Swift.Codable instead")
    open func propertyMapping(_ map: Map)
  • Undocumented

    Declaration

    Swift

    open class func decodeArray<T>(from data: Data) throws -> [T] where T : JSONDecodable
  • Undocumented

    Declaration

    Swift

    open class func decode<T>(from data: Data) throws -> T where T : JSONDecodable
  • Undocumented

    Declaration

    Swift

    open class func decode<T>(from dictionary: [String : Any]) throws -> T where T : JSONDecodable
  • Undocumented

    Declaration

    Swift

    open func refresh(from dictionary: [String : Any]) throws
  • Undocumented

    Declaration

    Swift

    open func encode() throws -> [String : Any]
  • This function is where all variable mappings should occur. It is executed by Mapper during the mapping (serialization and deserialization) process.

    Declaration

    Swift

    @available(*, deprecated, message: "Deprecated in version 3.18.0. Please use Swift.Codable instead")
    public func mapping(map: Map)
  • Property names for the Entity class

    See more

    Declaration

    Swift

    public enum EntityCodingKeys : String, CodingKey
  • Undocumented

    Declaration

    Swift

    public subscript<Key>(key: Key) -> Any? where Key : RawRepresentable, Key.RawValue == String { get }
  • Undocumented

    Declaration

    Swift

    open override var hash: Int { get }
  • Undocumented

    Declaration

    Swift

    public static func == (lhs: Entity, rhs: Entity) -> Bool
  • Undocumented

    Declaration

    Swift

    open override func isEqual(_ object: Any?) -> Bool