- Inherits from:
- (com.apple.client.eocontrol) EODataSource : Object
(com.apple.yellow.eocontrol) EODataSource : NSObject
- Package:
- com.apple.client.eocontrol
- com.apple.yellow.eocontrol
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 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.
- Constructors
- EODetailDataSource
- Qualifying instances
- qualifyWithRelationshipKey
- Examining instances
- masterDataSource
- detailKey
- masterObject
- Accessing the master class description
- masterClassDescription
- setMasterClassDescription (com.apple.yellow.eocontrol only)
- Accessing the objects
- fetchObjects
- Inserting and deleting objects
- insertObject
- deleteObject
- Accessing the master editing context
- editingContext
public
EODetailDataSource
(
EOClassDescription masterClassDescription,
String relationshipKey)
Creates and returns a new EODetailDataSource object. The new data source's masterObject is associated with masterClassDescription, and relationshipKey is assigned to the new data source's detailKey. The constructor invokes qualifyWithRelationshipKey specifying relationshipKey as the relationship key and null as the object.
See Also: masterClassDescription
public
EODetailDataSource
(
EODataSource masterDataSource,
String relationshipKey)
Creates and returns a new EODetailDataSource
object. The new data source provides destination objects for the
relationship named by relationshipKey from
a masterObject
in masterDataSource.
See Also: masterDataSource
public void
deleteObject
(Object anObject)
public String
detailKey
()
public EOEditingContext
editingContext
()
public NSArray
fetchObjects
()
public void
insertObject
(Object anObject)
public EOClassDescription
masterClassDescription
()
See Also: setMasterClassDescription, EODetailDataSource constructor
public EODataSource
masterDataSource
()
See Also: detailKey, EODetailDataSource constructor
public Object
masterObject
()
See Also: detailKey
qualifyWithRelationshipKey
public void
qualifyWithRelationshipKey
(
String relationshipKey,
Object masterObject)
See Also: detailKey
public void
setMasterClassDescription
(EOClassDescription classDescription)
See Also: masterClassDescription