RKManagedObjectMappingOperationDataSource Class Reference
| Inherits from | NSObject |
| Conforms to | RKMappingOperationDataSource |
| Declared in | RKManagedObjectMappingOperationDataSource.h |
Overview
The RKManagedObjectMappingOperationDataSource class provides support for performing object mapping operations where the mapped objects exist within a Core Data managed object context. The class is responsible for finding exist managed object instances by the identification attributes, instantiating new managed objects, and connecting relationships for mapped objects.
Tasks
Initializing a Managed Object Mapping Operation Data Source
-
– initWithManagedObjectContext:cache:Initializes the receiver with a given managed object context and managed object cache.
Accessing the Managed Object Context and Cache
-
managedObjectContextThe managed object context with which the receiver is associated.
property -
managedObjectCacheThe managed object cache utilized by the receiver to find existing managed object instances by the identification attributes. A nil managed object cache will result in the insertion of new managed objects for all mapped content.
property
Configuring Relationship Connection Queueing
-
parentOperationThe parent operation upon which instances of
propertyRKRelationshipConnectionOperationcreated by the data source are dependent upon. -
operationQueueThe operation queue in which instances of
propertyRKRelationshipConnectionOperationwill be enqueued to connect the relationships of mapped objects.
Properties
managedObjectCache
The managed object cache utilized by the receiver to find existing managed object instances by the identification attributes. A nil managed object cache will result in the insertion of new managed objects for all mapped content.
@property (nonatomic, strong, readonly) id<RKManagedObjectCaching> managedObjectCacheDeclared In
RKManagedObjectMappingOperationDataSource.hmanagedObjectContext
The managed object context with which the receiver is associated.
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContextDeclared In
RKManagedObjectMappingOperationDataSource.hoperationQueue
The operation queue in which instances of RKRelationshipConnectionOperation will be enqueued to connect the relationships of mapped objects.
@property (nonatomic, strong) NSOperationQueue *operationQueueDiscussion
If nil, then current operation queue as returned from [NSOperationQueue currentQueue] will be used.
Please see the documentation for parentOperation for a discussion of this property’s function.
Declared In
RKManagedObjectMappingOperationDataSource.hparentOperation
The parent operation upon which instances of RKRelationshipConnectionOperation created by the data source are dependent upon.
@property (nonatomic, weak) NSOperation *parentOperationDiscussion
When connecting relationships as part of a managed object mapping operation, it is possible that the mapping operation itself will create managed objects that should be used to satisfy the connections mappings of representations being mapped. To support such cases, is is desirable to defer the execution of connection operations until the execution of the aggregate mapping operation is complete. The parentOperation property provides support for deferring the execution of the enqueued relationship connection operations by establishing a dependency between the connection operations and a parent operation, such as an instance of RKMapperOperation such that they will not be executed by the operationQueue until the parent operation has finished executing.
Declared In
RKManagedObjectMappingOperationDataSource.hInstance Methods
initWithManagedObjectContext:cache:
Initializes the receiver with a given managed object context and managed object cache.
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext cache:(id<RKManagedObjectCaching>)managedObjectCacheParameters
- managedObjectContext
The managed object context with which to associate the receiver. Cannot be nil.
- managedObjectCache
The managed object cache used by the receiver to find existing object instances by their identification attributes.
Return Value
The receiver, initialized with the given managed object context and managed objet cache.
Declared In
RKManagedObjectMappingOperationDataSource.h