EODetailDataSource
- Inherits from:
- EODataSource
- NSObject
- Conforms to:
- NSObject
- (NSObject)
Declared in:
- EOControl/EODetailDataSource.h
Class Description
EODetailDataSource defines a data source for use in master-detail configurations, where operations in the detail data source are applied directly to properties of a master object. EODetailDataSource implements the standard fetchObjects, insertObject:, and deleteObject: methods to operate on a relationship property of its master object, so it works for any concrete subclass of EODataSource, including another EODetailDataSource (for a chain of three master and detail data sources).
To set up an EODetailDataSource programmatically, you typically create it by sending a dataSourceQualifiedByKey: message to the master data source, then establish the master object with a qualifyWithRelationshipKey:ofObject: message. The latter method records the name of a relationship for a particular object to resolve in fetchObjects and to modify in insertObject:, and deleteObject:. These three methods then manipulate the relationship property of the master object to perform the operations requested. See the individual method descriptions for more information.
Method Types
- Creating instances
- - initWithMasterClassDescription:detailKey:
- - initWithMasterDataSource:detailKey:
- Qualifying instances
- - qualifyWithRelationshipKey:ofObject:
- Examining instances
- - masterDataSource
- - detailKey
- - masterObject
- Accessing the master class description
- - masterClassDescription
- - setMasterClassDescription:
- Accessing the objects
- - fetchObjects
- Inserting and deleting objects
- - insertObject:
- - deleteObject:
- Accessing the master editing context
- - editingContext
Instance Methods
deleteObject:
- (void)deleteObject:(id)anObject
detailKey
- (NSString *)detailKey
editingContext
- (EOEditingContext *)editingContext
fetchObjects
- (NSArray *)fetchObjects
initWithMasterClassDescription:detailKey:
- initWithMasterClassDescription:(EOClassDescription
*)masterClassDescription detailKey:(NSString
*)relationshipKey
See Also: - masterClassDescription, - detailKey
initWithMasterDataSource:detailKey:
- (id)initWithMasterDataSource:(EODataSource
*)masterDataSource
detailKey:(NSString *)relationshipKey
See Also: - masterDataSource, - detailKey
insertObject:
- (void)insertObject:(id)anObject
masterClassDescription
- (EOClassDescription *)masterClassDescription
See Also: - setMasterClassDescription:, - initWithMasterClassDescription:detailKey:
masterDataSource
- (EODataSource *)masterDataSource
See Also: - detailKey, - initWithMasterDataSource:detailKey:
masterObject
- (id)masterObject
See Also: - detailKey
qualifyWithRelationshipKey:ofObject:
- (void)qualifyWithRelationshipKey:(NSString
*)relationshipKey
ofObject:(id)masterObject
See Also: - detailKey
setMasterClassDescription:
- (void)setMasterClassDescription:(EOClassDescription
*)classDescription
See Also: - masterClassDescription