mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-21 10:54:31 +08:00
Formatting fixes and missing parameters
This commit is contained in:
@@ -94,6 +94,7 @@ extern NSString * const RKEntityDescriptionPrimaryKeyAttributeValuePredicateSubs
|
||||
appropriate. This behavior is a convenience to avoid annoying issues related to Core Data's
|
||||
handling of predicates for NSString and NSNumber types that were not appropriately casted.
|
||||
|
||||
@param value The primary key value with which to create the predicate.
|
||||
@return A predicate speciying that the value of the primary key attribute is equal to a given value.
|
||||
*/
|
||||
- (NSPredicate *)predicateForPrimaryKeyAttributeWithValue:(id)value;
|
||||
@@ -102,6 +103,7 @@ extern NSString * const RKEntityDescriptionPrimaryKeyAttributeValuePredicateSubs
|
||||
Coerces the given value into the class representing the primary key. Currently support NSString
|
||||
and NSNumber coercsions.
|
||||
|
||||
@param primaryKeyValue The value of the primary that is to be coerced.
|
||||
@bug **NOTE** This API is temporary and will be deprecated and replaced.
|
||||
@since 0.10.1
|
||||
*/
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
|
||||
NSURL *URL = [importer.persistentStore.persistentStoreCoordinator URLForPersistentStore:importer.persistentStore];
|
||||
return [URL path];
|
||||
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSString *storePath;
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
`RKManagedObjectResponseMapperOperation` is an `RKResponseMapperOperation` subclass that provides support for performing object mapping using `RKEntityMapping` objects that target `NSManagedObject` derived classes. It requires an `NSManagedObjectContext` and a configured `RKManagedObjectMappingOperationDataSource` data source to execute successfully.
|
||||
|
||||
Performing response mapping that targets Core Data managed objects imposes some additional constraints on the process that the developer should understand thoroughly:
|
||||
|
||||
1. **Permanent Managed Object IDs**: When using managed object contexts in a parent-child configuration, it is important to obtain a permanent `NSManagedObjectID` for any existing objects that are to be mapped. Mapping that occur against objecs with temporary managedObjectID's cannot be retrieved across contexts by ID. If executing an `RKManagedObjectResponseMapperOperation` against a `NSManagedObject` targetObject with a temporary ID.
|
||||
1. **Persisting Mapped Objects**: Instances of `RKManagedObjectResponseMapperOperation` do **NOT** perform any persistence on the `NSManagedObject` in which the mapping occurs. This is by design and ensures that the operation can be used to compose higher level components that handle persistence. It is the developer's responsibility to ensure that the mapped managed objects are eventually persisted.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
extern NSString * const RKSearchableAttributeNamesUserInfoKey;
|
||||
|
||||
/**
|
||||
The RKSearchIndexer class provides support for adding full text searching
|
||||
The `RKSearchIndexer` class provides support for adding full text searching
|
||||
to Core Data entities and managing the indexing of managed object instances
|
||||
of searchable entities.
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
*/
|
||||
@interface RKMIMETypeSerialization : NSObject
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
///---------------------------------------
|
||||
/// @name Managing MIME Type Registrations
|
||||
///-----------------------------------------------------------------------------
|
||||
///---------------------------------------
|
||||
|
||||
/**
|
||||
Registers the given serialization class to handle content for the given MIME Type identifier.
|
||||
@@ -77,9 +77,9 @@
|
||||
*/
|
||||
+ (NSSet *)registeredMIMETypes;
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
///---------------------------------------------------------
|
||||
/// @name Serializing and Deserializing Content by MIME Type
|
||||
///-----------------------------------------------------------------------------
|
||||
///---------------------------------------------------------
|
||||
|
||||
/**
|
||||
Deserializes and returns a Foundation object representation of the given UTF-8 encoded data in
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
*/
|
||||
@interface RKPathMatcher : NSObject <NSCopying>
|
||||
|
||||
@property (copy, readonly) NSDictionary *queryParameters;
|
||||
///---------------------------------
|
||||
/// @name Matching Paths to Patterns
|
||||
///---------------------------------
|
||||
|
||||
/**
|
||||
Creates an RKPathMatcher starting from a path string. This method should be followed by
|
||||
@@ -69,6 +71,10 @@
|
||||
*/
|
||||
- (BOOL)matchesPattern:(NSString *)patternString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments;
|
||||
|
||||
///---------------------------------
|
||||
/// @name Matching Patterns to Paths
|
||||
///---------------------------------
|
||||
|
||||
/**
|
||||
Creates an RKPathMatcher starting from a pattern string. This method should be followed by
|
||||
matchesPath:tokenizeQueryStrings:parsedArguments: Patterns should include encoded parameter keys,
|
||||
@@ -100,6 +106,10 @@
|
||||
*/
|
||||
- (BOOL)matchesPath:(NSString *)pathString tokenizeQueryStrings:(BOOL)shouldTokenize parsedArguments:(NSDictionary **)arguments;
|
||||
|
||||
///----------------------------------
|
||||
/// @name Creating Paths from Objects
|
||||
///----------------------------------
|
||||
|
||||
/**
|
||||
Generates a new path by interpolating the properties of the 'object' argument, assuming the existence
|
||||
of a previously specified pattern established via matcherWithPattern:. Otherwise, this method is identical in
|
||||
@@ -117,7 +127,7 @@
|
||||
@see RKMakePathWithObject
|
||||
@see RKRouter
|
||||
*/
|
||||
- (NSString *)pathFromObject:(id)object;
|
||||
- (NSString *)pathFromObject:(id)object DEPRECATED_ATTRIBUTE;
|
||||
|
||||
/**
|
||||
Generates a path by interpolating the properties of the 'object' argument, assuming the existence
|
||||
@@ -139,4 +149,10 @@
|
||||
*/
|
||||
- (NSString *)pathFromObject:(id)object addingEscapes:(BOOL)addEscapes;
|
||||
|
||||
///-------------------------------------------
|
||||
/// @name Accessing Tokenized Query Parameters
|
||||
///-------------------------------------------
|
||||
|
||||
@property (copy, readonly) NSDictionary *queryParameters;
|
||||
|
||||
@end
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
@param object The object to be serialized.
|
||||
@param A pointer to an NSError object.
|
||||
@param error A pointer to an NSError object.
|
||||
@return A data representation of the given object in UTF-8 encoding, or nil if an error occurred.
|
||||
*/
|
||||
+ (NSData *)dataFromObject:(id)object error:(NSError **)error;
|
||||
|
||||
Reference in New Issue
Block a user