forked from brightsoftdev/Additions-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNSManagedObject+Additions.h
More file actions
32 lines (27 loc) · 874 Bytes
/
NSManagedObject+Additions.h
File metadata and controls
32 lines (27 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// NSManagedObject+Additions.h
//
// Created by Wess Cope on 9/23/11.
// Copyright 2012. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface NSManagedObject(Additions)
#pragma mark - Class methods
+ (void)setContext:(NSManagedObjectContext *)context;
+ (NSManagedObjectContext *)context;
+ (NSString *)name;
+ (NSEntityDescription *)description;
+ (id)new;
+ (id)new:(NSDictionary *)details;
+ (NSNumber *)count;
+ (NSNumber *)countwithPredicate:(NSPredicate *)predicate;
+ (NSArray *)all;
+ (id)filterWithPredicate:(NSPredicate *)predicate;
+ (id)filterWithSortDescriptors:(NSArray *)sortDescriptors;
+ (id)filterWithPredicate:(NSPredicate *)predicate sortDescriptors:(NSArray *)sortDescriptors;
+ (id)getWithPredicate:(NSPredicate *)predicate;
+ (void)deleteAll;
#pragma mark - Instance methods
- (BOOL)save;
@end