EODataSource
- Inherits from:
- (com.apple.client.eocontrol) Object
(com.apple.yellow.eocontrol) NSObject
- Package:
- com.apple.client.eocontrol
- com.apple.yellow.eocontrol
Class Description
EODataSource is an abstract class that defines a basic API for providing enterprise objects. It exists primarily as a simple means for a display group (EODisplayGroup from EOInterface or WODisplayGroup from WebObjects) or other higher-level class to access a store of objects. EODataSource defines functional implementations of very few methods; concrete subclasses, such as EODatabaseDataSource (defined in EOAccess) and EODetailDataSource, define working data sources by implementing the others. EODatabaseDataSource, for example, provides objects fetched through an EOEditingContext, while EODetailDataSource provides objects from a relationship property of a master object. For information on creating your own EODataSource subclass, see the section "Creating a Subclass".
An EODataSource provides its objects with its fetchObjects method. insertObject and deleteObject add and remove individual objects, and createObject instantiates a new object. Other methods provide information about the objects, as described below.
Method Types
- Accessing the objects
- fetchObjects
- Inserting and deleting objects
- createObject
- insertObject
- deleteObject
- Creating detail data sources
- dataSourceQualifiedByKey
- qualifyWithRelationshipKey
- Accessing the editing context
- editingContext
- Accessing the class description
- classDescriptionForObjects
Instance Methods
classDescriptionForObjects
public EOClassDescription
classDescriptionForObjects
()
createObject
public Object
createObject
()
As
a convenience, EODataSource's implementation sends the receiver's
EOClassDescription a createInstanceWithEditingContext message
to create the object. If this succeeds and the receiver has an EOEditingContext,
it sends the EOEditingContext an insertObject message to register
the new object with the EOEditingContext (note that this does not insert
the object into the EODataSource). Subclasses that don't use EOClassDescriptions
or EOEditingContexts should override this method without invoking super
's
implementation.
See Also: classDescriptionForObjects, editingContext
dataSourceQualifiedByKey
public abstract EODataSource
dataSourceQualifiedByKey
(String relationshipKey)
super
's implementation.deleteObject
public abstract void
deleteObject
(Object anObject)
super
's implementation.editingContext
public EOEditingContext
editingContext
()
fetchObjects
public NSArray
fetchObjects
()
insertObject
public abstract void
insertObject
(Object object)
super
's implementation.qualifyWithRelationshipKey
public abstract void
qualifyWithRelationshipKey
(
String key,
Object sourceObject)
super
's implementation.