home *** CD-ROM | disk | FTP | other *** search
- // EOFetchSpecification.h
- // Copyright (c) 1995, NeXT Software, Inc. All rights reserved.
- //
- // EOFetchSpecification is designed to be provide a generic way to specify a set of
- // objects to be returned by an object source. The fetch specification holds a
- // qualifier, an array of orderings, an entityName, whether the search should be
- // deep or shallow and whether or not each object should be distinct in the results.
- //
- #import <Foundation/Foundation.h>
-
- @class EOQualifier;
-
- @interface EOFetchSpecification : NSObject <NSCopying, NSCoding>
- {
- EOQualifier *_qualifier;
- NSArray *_sortOrderings;
- NSString *_entityName;
- NSDictionary *_hints;
- struct {
- unsigned usesDistinct:1;
- unsigned isDeep:1;
- unsigned locksObjects:1;
- unsigned refreshesRefetchedObjects:1;
- unsigned _reserved:28;
- }_flags;
- }
-
- - init;
- // designated initializer
-
- - initWithEntityName:(NSString *)entityName qualifier:(EOQualifier *)qualifier
- sortOrderings:(NSArray *)sortOrderings usesDistinct:(BOOL)usesDistinct
- isDeep:(BOOL)isDeep hints:(NSDictionary *)hints;
- // For convenience
-
- + (EOFetchSpecification *)fetchSpecificationWithEntityName:(NSString *)name
- qualifier:(EOQualifier *)qualifier sortOrderings:(NSArray *)sortOrderings;
- // returns an autorelease FetchSpecification
-
- - copyWithZone:(NSZone *)zone;
- - copy;
-
- - (void)setEntityName:(NSString *)entityName;
- - (NSString *)entityName;
-
- - (void)setSortOrderings:(NSArray *)sortOrderings;
- - (NSArray *)sortOrderings;
-
- - (void)setQualifier:(EOQualifier *)qualifier;
- - (EOQualifier *)qualifier;
-
- - (void)setUsesDistinct:(BOOL)usesDistinct;
- - (BOOL)usesDistinct;
- // Sets/Returns whether duplicate objects are removed from the resulting
- // set of objects when fetched. Default is NO;
-
- - (void)setIsDeep:(BOOL)setIsDeep;
- - (BOOL)isDeep;
- // Sets/Returns whether all entities in the inheritance hierarchy are
- // fetched. Default is YES;
-
- - (void)setLocksObjects:(BOOL)setLocksObjects;
- - (BOOL)locksObjects;
- // Sets/Returns whether objects that are fetched will be locked by the
- // underlying datastore. Defaultis NO;
-
- - (void)setRefreshesRefetchedObjects:(BOOL)refreshesRefetchedObjects;
- - (BOOL)refreshesRefetchedObjects;
- // Sets/Returns whether objects that are refetched by this query
- // and that were updated by some other process since they were
- // last fetched are refreshed. Default is NO.
-
- - (void)setHints:(NSDictionary *)hints;
- - (NSDictionary *)hints;
-
- @end
-