Inherits from NSObject
Conforms to NSCopying
Declared in RKPropertyMapping.h

Overview

RKPropertyMapping is an abstract class for describing the properties being mapped within an RKObjectMapping or RKEntityMapping object. It defines the common interface for its concrete subclasses RKAttributeMapping and RKRelationshipMapping. Each property mapping defines a single transformation from a source key path (often in the deserialized representation of a JSON or XML document) to a destination key path (typically on a target object).

Tasks

Accessing the Parent Object Mapping

Accessing the Source and Destination Key Paths

  •   sourceKeyPath

    A key path on the source object from which to get information that is to be mapped onto the destination object.

    property
  •   destinationKeyPath

    A key path on the destination object on which to set information that has been mapped from the source object.

    property

Comparing Property Mappings

Properties

destinationKeyPath

A key path on the destination object on which to set information that has been mapped from the source object.

@property (nonatomic, copy, readonly) NSString *destinationKeyPath

Declared In

RKPropertyMapping.h

objectMapping

Returns the object mapping the receiver is added to.

@property (nonatomic, weak, readonly) RKObjectMapping *objectMapping

Declared In

RKPropertyMapping.h

sourceKeyPath

A key path on the source object from which to get information that is to be mapped onto the destination object.

@property (nonatomic, copy, readonly) NSString *sourceKeyPath

Declared In

RKPropertyMapping.h

Instance Methods

isEqualToMapping:

Compares the receiving property mapping to another property mapping.

- (BOOL)isEqualToMapping:(RKPropertyMapping *)otherMapping

Parameters

otherMapping

The property mapping object with which to compare the receiver.

Return Value

YES if otherMapping specifies the same mapping as the receiver, otherwise NO.

Discussion

Two property mappings are equal if they are of the same type (i.e. an RKAttributeMapping or an RKRelatiobshipMapping object) and specify a mapping from the same source key path to the same destination key path.

Declared In

RKPropertyMapping.h