|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eocontrol.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.
fetchObjects()
,
insertObject(Object eo)
,
deleteObject(Object eo)
,
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 EOClassDescription classDescriptionForObjects()
null
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 objectinsertObject(Object object)
,
EOClassDescription.createInstanceWithEditingContext(
EOEditingContext editingContext, EOGlobalID globalID)
,
classDescriptionForObjects()
,
editingContext()
public abstract EODataSource dataSourceQualifiedByKey(String key)
qualifyWithRelationshipKey
to set a specific master object or to
change the relationship key
.key
- the relationship keyexception
- on EODataSource's implementation.qualifyWithRelationshipKey( String key, Object sourceObject)
public abstract void deleteObject(Object eo)
eo
- the object to be deletedexception
- on EODataSource
's implementationpublic EOEditingContext editingContext()
null
when implemented by EODataSourcepublic NSArray fetchObjects()
public abstract void insertObject(Object eo)
eo
- the object to be insertedexception
- on EODataSource's implementationpublic 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 thisexception
- on EODataSource
's implementation.dataSourceQualifiedByKey(String key)
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |