|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.eocontrol.EODataSource
public abstract class EODataSource
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 concrete subclasses, such as EODatabaseDataSource (defined in com.webobjects.eoaccess) and EODetailDataSource, which 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.
An EODataSource provides its objects with its fetchObjects
method. insertObject
and deleteObject
add and remove
individual objects, while createObject
instantiates new objects. Other
methods provide information about the objects.
See EODataSourceConcepts for more information.
EODataSource.fetchObjects()
,
EODataSource.insertObject(Object eo)
,
EODataSource.deleteObject(Object eo)
,
EODataSource.createObject()
Constructor Summary | |
---|---|
EODataSource()
|
Method Summary | |
---|---|
EOClassDescription |
classDescriptionForObjects()
Implemented by subclasses to return an EOClassDescription that provides information about the objects provided by the receiver. |
Object |
createObject()
Creates a new object, inserts it in the receiver's collection of objects if appropriate, and returns the object. |
abstract EODataSource |
dataSourceQualifiedByKey(String key)
Implemented by subclasses to provide the destination objects of a relationship. |
abstract void |
deleteObject(Object eo)
Implemented by subclasses to delete an object. |
EOEditingContext |
editingContext()
Implemented by subclasses to return the receiver's EOEditingContext. |
NSArray |
fetchObjects()
Implemented by subclasses to fetch and return the objects provided by the receiver. |
abstract void |
insertObject(Object eo)
Implemented by subclasses to insert objects. |
abstract void |
qualifyWithRelationshipKey(String key,
Object sourceObject)
Implemented by subclasses to qualify the receiver, a detailed EODataSource, to display destination objects for a relationship. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EODataSource()
Method Detail |
---|
public Object createObject()
null
if the receiver can't create the object or can't insert it.
You should invoke insertObject
after this method to actually add
the new object to the receiver.
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 the superclass's implementation.
null
if the receiver can't create the object or can't insert it,
otherwise returns the objectEODataSource.insertObject(Object object)
,
EOClassDescription.createInstanceWithEditingContext(
EOEditingContext editingContext, EOGlobalID globalID)
,
EODataSource.classDescriptionForObjects()
,
EODataSource.editingContext()
public abstract void insertObject(Object eo)
eo
- the object to be inserted
exception
- on EODataSource's implementationpublic abstract void deleteObject(Object eo)
eo
- the object to be deleted
exception
- on EODataSource
's implementationpublic NSArray fetchObjects()
public EOEditingContext editingContext()
null
when implemented by EODataSourcepublic EOClassDescription classDescriptionForObjects()
null
public abstract EODataSource dataSourceQualifiedByKey(String key)
qualifyWithRelationshipKey
to set a specific master object or to
change the relationship key
.
key
- the relationship key
exception
- on EODataSource's implementation.EODataSource.qualifyWithRelationshipKey( String key, Object sourceObject)
public abstract void qualifyWithRelationshipKey(String key, Object sourceObject)
dataSourceQualifiedByKey
message that created the receiver.
If source object is null
, the receiver qualifies itself to provide
no objects.
key
- names the relationship the objects is to be displayed withsourceObject
- destination objects belongs to this
exception
- on EODataSource
's implementation.EODataSource.dataSourceQualifiedByKey(String key)
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |