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

  1. // EODatabaseDataSource.h
  2. // Copyright (c) 1994, NeXT Software, Inc. All rights reserved.
  3.  
  4. #import <EOControl/EOControl.h>
  5.  
  6. @class EODatabaseContext;
  7. @class EOEntity;
  8.  
  9.  
  10. // An EODatabaseDataSource is a implementation of the abstrace
  11. // EODataSource class. EODatabaseDataSource's are used for fetching
  12. // from a database.
  13.  
  14. @interface EODatabaseDataSource : EODataSource <NSCoding>
  15. {
  16.     id _reserved;
  17.     EOEditingContext *_editingContext;
  18.     EOFetchSpecification *_fetchSpecification;
  19.     EOQualifier *_auxiliaryQualifier;
  20.     struct {
  21.     unsigned int fetchEnabled:1;
  22.     unsigned int _RESERVED:31;
  23.     } _flags;
  24. }
  25.  
  26. - initWithEditingContext:(EOEditingContext *)anEditingContext
  27.               entityName:(NSString *)anEntityName;
  28.     // Used to initialize a new datasource with an editingContext. This method will
  29.     // find the editingContext's objectStoreCoordinator and search for a channel that
  30.     // services this entity's model. If one exists, then the datasource uses it, otherwise
  31.     // a new one is created for this datasource.
  32.     // This is the primitive initializer.
  33.  
  34. - (EOEntity *)entity;
  35.     // Returns the root entity of the EODatabaseDataSource.  The objects it
  36.     // supplies are fetched for this entity.
  37.  
  38. - (EODatabaseContext *)databaseContext;
  39.     // returns the databaseContext this dataSource fetches from.
  40.  
  41. - (void)setFetchSpecification:(EOFetchSpecification *)fetchSpecification;
  42. - (EOFetchSpecification *)fetchSpecification;
  43.     // Set/return the fetch specifiction used when supplying objects.  See
  44.     // EOFetchSpecification.h for more information.
  45.  
  46. - (void)setAuxiliaryQualifier:(EOQualifier *)newQualifier;
  47. - (EOQualifier *)auxiliaryQualifier;
  48.     // Set/return an auxiliary qualifier that will be conjoined with the regular
  49.     // qualifier in the fetch specification to further restrict the set of objects
  50.     // to be fetched.
  51.  
  52. - (EOFetchSpecification *)fetchSpecificationForFetch;
  53.     // Returns a copy of the EOFetchSpecification that we be used to fetch.
  54.     // The is the result of copying the primary fetch specification and conjoining
  55.     // its qualifier with the auxiliaryQualifier.  Modify the returned fetchSpecification
  56.     // will not affect a subsequent call to fetchObjects.
  57.  
  58. - (void)setFetchEnabled:(BOOL)yn;
  59. - (BOOL)isFetchEnabled;
  60.     // Set/return whether fetching is enabled. These are used to disable fetching when
  61.     // the datasource is acting as a peer in a master/peer configuration and the master
  62.     // has nothing selected.    
  63.  
  64. @end
  65.