home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / EODEV.Z / EOFetchSpecification.h < prev    next >
Encoding:
Text File  |  1996-09-11  |  2.4 KB  |  77 lines

  1. // EOFetchSpecification.h
  2. // Copyright (c) 1995, NeXT Software, Inc. All rights reserved. 
  3. //
  4. // EOFetchSpecification is designed to be provide a generic way to specify a set of
  5. // objects to be returned by an object source. The fetch specification holds a
  6. // qualifier, an array of orderings, an entityName, whether the search should be
  7. // deep or shallow and whether or not each object should be distinct in the results.
  8. //
  9. #import <Foundation/Foundation.h>
  10.  
  11. @class EOQualifier;
  12.  
  13. @interface EOFetchSpecification : NSObject <NSCopying, NSCoding>
  14. {
  15.     EOQualifier *_qualifier;
  16.     NSArray *_sortOrderings;
  17.     NSString *_entityName;
  18.     NSDictionary *_hints;
  19.     struct {
  20.         unsigned usesDistinct:1;
  21.         unsigned isDeep:1;
  22.         unsigned locksObjects:1;
  23.         unsigned refreshesRefetchedObjects:1;
  24.         unsigned _reserved:28;
  25.     }_flags;
  26. }
  27.  
  28. - init;
  29.     // designated initializer
  30.  
  31. - initWithEntityName:(NSString *)entityName qualifier:(EOQualifier *)qualifier
  32.     sortOrderings:(NSArray *)sortOrderings usesDistinct:(BOOL)usesDistinct
  33.     isDeep:(BOOL)isDeep hints:(NSDictionary *)hints;
  34.     // For convenience
  35.  
  36. + (EOFetchSpecification *)fetchSpecificationWithEntityName:(NSString *)name
  37.     qualifier:(EOQualifier *)qualifier sortOrderings:(NSArray *)sortOrderings;
  38.     // returns an autorelease FetchSpecification
  39.  
  40. - copyWithZone:(NSZone *)zone;
  41. - copy;
  42.  
  43. - (void)setEntityName:(NSString *)entityName;
  44. - (NSString *)entityName;
  45.  
  46. - (void)setSortOrderings:(NSArray *)sortOrderings;
  47. - (NSArray *)sortOrderings;
  48.  
  49. - (void)setQualifier:(EOQualifier *)qualifier;
  50. - (EOQualifier *)qualifier;
  51.  
  52. - (void)setUsesDistinct:(BOOL)usesDistinct;
  53. - (BOOL)usesDistinct;
  54.     // Sets/Returns whether duplicate objects are removed from the resulting
  55.     // set of objects when fetched. Default is NO;
  56.  
  57. - (void)setIsDeep:(BOOL)setIsDeep;
  58. - (BOOL)isDeep;
  59.     // Sets/Returns whether all entities in the inheritance hierarchy are
  60.     // fetched. Default is YES;
  61.  
  62. - (void)setLocksObjects:(BOOL)setLocksObjects;
  63. - (BOOL)locksObjects;
  64.     // Sets/Returns whether objects that are fetched will be locked by the
  65.     // underlying datastore. Defaultis NO;
  66.  
  67. - (void)setRefreshesRefetchedObjects:(BOOL)refreshesRefetchedObjects;
  68. - (BOOL)refreshesRefetchedObjects;
  69.     // Sets/Returns whether objects that are refetched by this query
  70.     // and that were updated by some other process since they were
  71.     // last fetched are refreshed. Default is NO.
  72.  
  73. - (void)setHints:(NSDictionary *)hints;
  74. - (NSDictionary *)hints;
  75.  
  76. @end
  77.