-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCPFetchRequest.j
47 lines (41 loc) · 1.06 KB
/
CPFetchRequest.j
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// CPFetchRequest.j
//
// Created by Raphael Bartolome on 11.11.09.
//
@import <Foundation/CPObject.j>
//TODO implement
@implementation CPFetchRequest : CPObject
{
CPEntityDescription _entity @accessors(property=entity);
CPInteger _fetchLimit @accessors(property=fetchLimit);
CPPredicate _predicate @accessors(property=predicate);
CPArray _sortDescriptors @accessors(property=sortDescriptors);
}
- (id)initWithEntity:(CPEntityDescription)aEntity
predicate:(CPPredicate)aPredicate
sortDescriptors:(CPArray)sortDescriptors
fetchLimit:(CPInteger) aFetchLimit
{
if(self = [super init])
{
_entity = aEntity;
_predicate = aPredicate;
_sortDescriptors = sortDescriptors;
_fetchLimit = aFetchLimit;
}
return self;
}
- (id)initWithEntity:(CPEntityDescription)aEntity
predicate:(CPPredicate)aPredicate
{
if(self = [super init])
{
_entity = aEntity;
_predicate = aPredicate;
_sortDescriptors = nil;
_fetchLimit = 0;
}
return self;
}
@end