home *** CD-ROM | disk | FTP | other *** search
- // EODatabaseDataSource.h
- // Copyright (c) 1994, NeXT Software, Inc. All rights reserved.
-
- #import <EOControl/EOControl.h>
-
- @class EODatabaseContext;
- @class EOEntity;
-
-
- // An EODatabaseDataSource is a implementation of the abstrace
- // EODataSource class. EODatabaseDataSource's are used for fetching
- // from a database.
-
- @interface EODatabaseDataSource : EODataSource <NSCoding>
- {
- id _reserved;
- EOEditingContext *_editingContext;
- EOFetchSpecification *_fetchSpecification;
- EOQualifier *_auxiliaryQualifier;
- struct {
- unsigned int fetchEnabled:1;
- unsigned int _RESERVED:31;
- } _flags;
- }
-
- - initWithEditingContext:(EOEditingContext *)anEditingContext
- entityName:(NSString *)anEntityName;
- // Used to initialize a new datasource with an editingContext. This method will
- // find the editingContext's objectStoreCoordinator and search for a channel that
- // services this entity's model. If one exists, then the datasource uses it, otherwise
- // a new one is created for this datasource.
- // This is the primitive initializer.
-
- - (EOEntity *)entity;
- // Returns the root entity of the EODatabaseDataSource. The objects it
- // supplies are fetched for this entity.
-
- - (EODatabaseContext *)databaseContext;
- // returns the databaseContext this dataSource fetches from.
-
- - (void)setFetchSpecification:(EOFetchSpecification *)fetchSpecification;
- - (EOFetchSpecification *)fetchSpecification;
- // Set/return the fetch specifiction used when supplying objects. See
- // EOFetchSpecification.h for more information.
-
- - (void)setAuxiliaryQualifier:(EOQualifier *)newQualifier;
- - (EOQualifier *)auxiliaryQualifier;
- // Set/return an auxiliary qualifier that will be conjoined with the regular
- // qualifier in the fetch specification to further restrict the set of objects
- // to be fetched.
-
- - (EOFetchSpecification *)fetchSpecificationForFetch;
- // Returns a copy of the EOFetchSpecification that we be used to fetch.
- // The is the result of copying the primary fetch specification and conjoining
- // its qualifier with the auxiliaryQualifier. Modify the returned fetchSpecification
- // will not affect a subsequent call to fetchObjects.
-
- - (void)setFetchEnabled:(BOOL)yn;
- - (BOOL)isFetchEnabled;
- // Set/return whether fetching is enabled. These are used to disable fetching when
- // the datasource is acting as a peer in a master/peer configuration and the master
- // has nothing selected.
-
- @end
-