25 #import "CoreDataHeaders.h"
42 TEST_RELEASE(_affectedStores);
43 TEST_RELEASE(_entity);
44 TEST_RELEASE(_predicate);
52 - (id) _initWithAffectedStores: (NSArray *) affectedStores
53 entity: (NSEntityDescription *) entity
54 fetchLimit: (
unsigned int) fetchLimit
55 predicate: (NSPredicate *) predicate
56 sortDescriptors: (NSArray *) sortDescriptors
58 if ((
self = [
self init]))
75 return _affectedStores;
81 - (void) setAffectedStores: (NSArray *) stores
83 ASSIGN(_affectedStores, stores);
90 - (NSEntityDescription *)
entity
99 - (void) setEntity: (NSEntityDescription *) entity
116 - (void) setFetchLimit: (
unsigned int) aLimit
118 _fetchLimit = aLimit;
134 - (void) setPredicate: (NSPredicate *) predicate
145 return _sortDescriptors;
153 - (void) setSortDescriptors: (NSArray *) sortDescriptors
160 - (id) copyWithZone: (NSZone *) zone
163 _initWithAffectedStores: _affectedStores
165 fetchLimit: _fetchLimit
166 predicate: _predicate
167 sortDescriptors: _sortDescriptors];
172 - (void) encodeWithCoder: (NSCoder *) coder
174 if ([coder allowsKeyedCoding])
176 [coder encodeObject: _affectedStores forKey: @"AffectedStores"];
177 [coder encodeObject: _entity forKey: @"Entity"];
178 [coder encodeInt: _fetchLimit forKey: @"FetchLimit"];
179 [coder encodeObject: _predicate forKey: @"Predicate"];
180 [coder encodeObject: _sortDescriptors forKey: @"SortDescriptors"];
184 [coder encodeObject: _affectedStores];
185 [coder encodeObject: _entity];
186 [coder encodeValueOfObjCType: @encode(unsigned int) at: &_fetchLimit];
187 [coder encodeObject: _predicate];
188 [coder encodeObject: _sortDescriptors];
192 - (id) initWithCoder: (NSCoder *) coder
194 if ((
self = [
self init]))
196 if ([coder allowsKeyedCoding])
198 ASSIGN(_affectedStores, [coder
199 decodeObjectForKey:
@"AffectedStores"]);
200 ASSIGN(_entity, [coder decodeObjectForKey:
@"Entity"]);
201 _fetchLimit = [coder decodeIntForKey: @"FetchLimit"];
202 ASSIGN(_predicate, [coder decodeObjectForKey:
@"Predicate"]);
203 ASSIGN(_sortDescriptors, [coder
204 decodeObjectForKey:
@"SortDescriptors"]);
208 ASSIGN(_affectedStores, [coder decodeObject]);
209 ASSIGN(_entity, [coder decodeObject]);
210 [coder decodeValueOfObjCType: @encode(unsigned int)
212 ASSIGN(_predicate, [coder decodeObject]);
213 ASSIGN(_sortDescriptors, [coder decodeObject]);
An object for storing details about managed object fetches.
unsigned int fetchLimit()
Returns the fetch limit of the receiver.
NSEntityDescription * entity()
Returns the entity of the fetch request.
NSArray * affectedStores()
Returns an array of stores on which this fetch will executed.
NSArray * sortDescriptors()
Returns the receiver's sort descriptors.
NSPredicate * predicate()
Returns the predicate of the receiver.