Mac OS X Reference Library Apple Developer Connection spyglass button

NSAtomicStoreCacheNode Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CoreData.framework
Availability
Available in Mac OS X v10.5 and later.
Companion guide
Declared in
NSAtomicStoreCacheNode.h
Related sample code

Overview

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

A node represents a single record in a persistent store.

You can subclass NSAtomicStoreCacheNode to provide custom behavior.

Tasks

Designated Initializer

Node Data

Instance Methods

initWithObjectID:

Returns a cache node for the given managed object ID.

- (id)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.

Availability
Related Sample Code
Declared In
NSAtomicStoreCacheNode.h

objectID

Returns the managed object ID for the receiver.

- (NSManagedObjectID *)objectID

Return Value

The managed object ID for the receiver.

Availability
Related Sample Code
Declared In
NSAtomicStoreCacheNode.h

propertyCache

Returns the property cache dictionary for the receiver.

- (NSMutableDictionary *)propertyCache

Return Value

The property cache dictionary for the receiver.

Discussion

This dictionary is used by valueForKey: and setValue:forKey: for property values. The default implementation returns nil unless the companion -setPropertyCache: method is invoked, or setValue:forKey: is invoked on the cache node with non-nil property values.

Availability
Declared In
NSAtomicStoreCacheNode.h

setPropertyCache:

Sets the property cache dictionary for the receiver.

- (void)setPropertyCache:(NSMutableDictionary *)propertyCache

Parameters
propertyCache

The property cache dictionary for the receiver.

Availability
Related Sample Code
Declared In
NSAtomicStoreCacheNode.h

setValue:forKey:

Sets the value for the given key.

- (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.

Availability
Related Sample Code
Declared In
NSAtomicStoreCacheNode.h

valueForKey:

Returns the value for a given key.

- (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.

Availability
Declared In
NSAtomicStoreCacheNode.h

Last updated: 2009-05-01

Did this document help you? Yes It's good, but... Not helpful...