NSIncrementalStoreNode Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/CoreData.framework |
| Availability | Available in OS X v10.7 and later. |
| Companion guide | |
| Declared in | NSIncrementalStoreNode.h |
Overview
NSIncrementalStoreNode is a concrete class to represent basic nodes in a Core Data incremental store.
A node represents a single record in a persistent store.
You can subclass NSIncrementalStoreNode to provide custom behavior.
Instance Methods
initWithObjectID:withValues:version:
Returns an object initialized with the given values.
Parameters
- objectID
A managed object ID.
- values
A dictionary containing the values persisted in an external store with keys corresponding to the names of the property description in the
NSEntityDescriptionobject described by objectID:For attributes: an immutable value (an instance of a value class such as
NSNumber,NSString,NSData). Missing attribute keys will assume a nil value.For to-one relationships: the managed object ID of the related object or an instance of
NSNullfor nil relationship values. A missing key will be resolved lazily through callingnewValueForRelationship:forObjectWithID:withContext:error:on theNSPersistentStoreobject. Lazy resolution for to-one relationships is discouraged.For to-many relationships: an instance of
NSArrayorNSSetcontaining the managed object IDs of the related objects. Empty to-many relationships must be represented by an empty non-nil collection. A missing key will be resolved lazily through callingnewValueForRelationship:forObjectWithID:withContext:error:on theNSPersistentStoreobject. Lazy resolution for to-many relationships is encouraged.
Unknown or unmodeled keys are stripped out.
- version
The revision number of this state. This value is used for conflict detection and merging.
Return Value
An object initialized with the given values.
Discussion
Availability
- Available in OS X v10.7 and later.
Declared In
NSIncrementalStoreNode.hobjectID
Returns the object ID that identifies the data stored by the receiver.
Return Value
The object ID that identifies the data stored by the receiver.
Availability
- Available in OS X v10.7 and later.
Declared In
NSIncrementalStoreNode.hupdateWithValues:version:
Update the values and version to reflect new data being saved to or loaded from the external store.
Parameters
- values
A dictionary containing updated values, in the same format as that described in
initWithObjectID:withValues:version:.- version
The version number for the transaction.
Discussion
Update the values and version to reflect new data being saved to or loaded from the external store. // The values dictionary is in the same format as the initializer
Availability
- Available in OS X v10.7 and later.
Declared In
NSIncrementalStoreNode.hvalueForPropertyDescription:
Returns the value for the given property.
Parameters
- prop
A property description for one of the properties in the receiver.
Return Value
The value for the property specified by prop. May return an instance of NSNull for to-one relationships.
Discussion
If a relationship is nil, you should create a new value by invoking newValueForRelationship:forObjectWithID:withContext:error: on the NSPersistentStore object.
Availability
- Available in OS X v10.7 and later.
Declared In
NSIncrementalStoreNode.h© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-10-12)