Mac Developer Library

Developer

CoreData Framework Reference NSAtomicStoreCacheNode Class Reference

Options
Deployment Target:

On This Page
Language:

NSAtomicStoreCacheNode

NSAtomicStoreCacheNode is a concrete class to represent basic nodes in a Core Data atomic store. More...

Inheritance


Conforms To


Import Statement


import CoreData @import CoreData;

Availability


Available in OS X v10.5 and later.
  • Returns a cache node for the given managed object ID.

    Declaration

    Swift

    init(objectID moid: NSManagedObjectID)

    Objective-C

    - (instancetype)initWithObjectID:(NSManagedObjectID *)moid

    Parameters

    moid

    A managed object ID.

    Return Value

    A cache node for the given managed object ID, or nil if the node could not be initialized.

    Import Statement

    import CoreData

    Availability

    Available in OS X v10.5 and later.

  • objectID objectID Property

    The managed object ID of the node. (read-only)

    Declaration

    Swift

    var objectID: NSManagedObjectID { get }

    Objective-C

    @property(nonatomic, readonly, strong) NSManagedObjectID *objectID

    Import Statement

    import CoreData

    Availability

    Available in OS X v10.5 and later.

  • The property cache dictionary of the node.

    Declaration

    Swift

    var propertyCache: NSMutableDictionary?

    Objective-C

    @property(nonatomic, strong) NSMutableDictionary *propertyCache

    Discussion

    This dictionary is used by valueForKey: and setValue:forKey: for property values. This property is nil unless it has been explicitly set or non-nil values have been set for keys using setValue:forKey:.

    Import Statement

    import CoreData

    Availability

    Available in OS X v10.5 and later.

  • Returns the value for a given key.

    Declaration

    Swift

    func valueForKey(_ key: String) -> AnyObject?

    Objective-C

    - (id)valueForKey:(NSString *)key

    Parameters

    key

    The name of a property.

    Return Value

    The value for the property named key. For an attribute, the return value is an instance of an attribute type supported by Core Data (see NSAttributeDescription); for a to-one relationship, the return value must be another cache node instance; for a to-many relationship, the return value must be an collection of the related cache nodes.

    Discussion

    The default implementation forwards the request to the propertyCache dictionary if key matches a property name of the entity for the cache node. If key does not represent a property, the standard valueForKey: implementation is used.

    Import Statement

    import CoreData

    Availability

    Available in OS X v10.5 and later.

  • Sets the value for the given key.

    Declaration

    Swift

    func setValue(_ value: AnyObject?, forKey key: String)

    Objective-C

    - (void)setValue:(id)value forKey:(NSString *)key

    Parameters

    value

    The value for the property identified by key.

    key

    The name of a property.

    Discussion

    The default implementation forwards the request to the propertyCache dictionary if key matches a property name of the entity for this cache node. If key does not represent a property, the standard setValue:forKey: implementation is used.

    Import Statement

    import CoreData

    Availability

    Available in OS X v10.5 and later.