CoreDataEntityProtocol
public protocol CoreDataEntityProtocol: class
Describes an entity in Core Data.
-
entityName
Default implementationThe name of the entity.
Default Implementation
Returns a default entity name for this managed object based on its class name.
Declaration
Swift
static var entityName: String
-
The default sort descriptors for a fetch request.
Declaration
Swift
static var defaultSortDescriptors: [NSSortDescriptor]
-
fetchRequest
Extension methodReturns a new fetch request with
defaultSortDescriptors
.Declaration
Swift
public static var fetchRequest: NSFetchRequest<Self>
-
entity(context:)
Extension methodReturns the entity with the specified name from the managed object model associated with the specified managed object context’s persistent store coordinator.
Declaration
Swift
public static func entity(context: NSManagedObjectContext) -> NSEntityDescription
Parameters
context
The managed object context to use.
Return Value
Returns the entity description for this managed object.