Created
July 8, 2013 22:35
-
-
Save jparishy/5953074 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <CoreData/CoreData.h> | |
typedef void(^FTFetchRequestConfigureBlock)(NSFetchRequest *fetchRequest); | |
typedef void(^FTFetchRequestCompletion)(NSOrderedSet *results, NSError *error); | |
typedef void(^FTFetchRequestSingleCompletion)(id model, NSError *error); | |
@interface FTFetchRequest : NSObject | |
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext; | |
-(id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext; | |
-(BOOL)modelsOfClass:(Class)modelClass fetchRequestBlock:(FTFetchRequestConfigureBlock)fetchRequestBlock completion:(FTFetchRequestCompletion)completion; | |
-(BOOL)modelsOfClass:(Class)modelClass withPrimaryKeyValues:(NSArray *)values completion:(FTFetchRequestCompletion)completion; | |
-(BOOL)findOrInsertModelOfClass:(Class)modelClass fetchRequestBlock:(FTFetchRequestConfigureBlock)fetchRequestBlock completion:(FTFetchRequestSingleCompletion)completion; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment