|
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 | +--com.webobjects.eodistribution.client.EODistributedDataSource
EODistributedDataSource is a concrete subclass of EODataSource (defined in the control layer) that fetches using an EOEditingContext as its source of objects. The editing context, in turn, forwards the fetch requests to its parent object store (usually an instance of EODistributedObjectStore) where it is ultimately serviced by an EODatabaseContext on the server.
EODistributedDataSource implements all the functionality defined by EODataSource: In addition to fetching objects, it can insert and delete them (provided the entity isn't read-only). See the EODataSource class specification for more information on these topics.
EODistributedDataSource provides several methods in addition to those defined by EODataSource.
The additional methods (fetchEnabled
and setFetchEnabled
,
fetchSpecification
and setFetchSpecification
, and
setAuxiliaryQualifier
) are added to support enabling and disabling fetching and to
support fetching with an EOFetchSpecification.
Constructor Summary | |
EODistributedDataSource(EOEditingContext editingContext,
String entityName)
Creates a new EODistributedDataSource for the entity identified by entityName . |
|
EODistributedDataSource(EOEditingContext editingContext,
String entityName,
String fetchSpecificationName)
Creates a new EODistributedDataSource for the entity identified by entityName . |
|
EODistributedDataSource(String entityName)
Creates a new EODistributedDataSource for the entity identified by entityName . |
Method Summary | |
EOClassDescription |
classDescriptionForObjects()
Implemented by subclasses to return an EOClassDescription that provides information about the objects provided by the receiver. |
EODataSource |
dataSourceQualifiedByKey(String key)
Implemented by subclasses to provide the destination objects of a relationship. |
void |
deleteObject(Object eo)
Implemented by subclasses to delete an object. |
EOEditingContext |
editingContext()
Implemented by subclasses to return the receiver's EOEditingContext. |
boolean |
fetchEnabled()
Returns whether fetching is enabled. |
NSArray |
fetchObjects()
If fetching is enabled, fetches and returns objects with the receiver's fetch specification; returns null otherwise. |
EOFetchSpecification |
fetchSpecification()
Returns the receiver's fetch specification (which by default fetches all the objects for the receiver's entity unless it is further restricted with setFetchSpecification or setAuxiliaryQualifier ). |
void |
insertObject(Object eo)
Implemented by subclasses to insert objects. |
void |
qualifyWithRelationshipKey(String key,
Object sourceObject)
Displays destination objects for the relationship named key belonging
to the source object sourceObject (owner of the relationship). |
void |
setAuxiliaryQualifier(EOQualifier qualifier)
Assigns qualifier as an auxiliary qualifier to the receiver's fetch
specification. |
void |
setEditingContext(EOEditingContext editingContext)
Sets the receiver's editing context. |
void |
setFetchEnabled(boolean fetchEnabled)
Sets whether or not fetching is enabled in the receiver. |
void |
setFetchSpecification(EOFetchSpecification fetchSpecification)
Assigns fetchSpecification to the receiver as the fetch
specification to use when fetching objects. |
void |
setFetchSpecificationName(String name)
|
Methods inherited from class com.webobjects.eocontrol.EODataSource |
createObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EODistributedDataSource(String entityName)
entityName
.entityName
- the name of the entity this data source handlespublic EODistributedDataSource(EOEditingContext editingContext, String entityName, String fetchSpecificationName)
entityName
.
If editingContext
is provided, the new data source uses it as its source of
objects and fetching is enabled. If it isn't provided, you must assign one with the
setEditingContext
method; until you do, fetching is disabled. This constructor
also allows you to designate a fetch specification to be used by the initialized instance.editingContext
- the editing context of the data sourceentityName
- the name of the entity this data source handlesfetchSpecificationName
- the name of a fetch specification for the specified entitypublic EODistributedDataSource(EOEditingContext editingContext, String entityName)
entityName
.
If editingContext
is provided, the new data source uses it as its source of
objects and fetching is enabled. If it isn't provided, you must assign one with the
setEditingContext
method; until you do, fetching is disabled.editingContext
- the editing context of the data sourceentityName
- the name of the entity this data source handlesMethod Detail |
public EOClassDescription classDescriptionForObjects()
EODataSource
classDescriptionForObjects
in class EODataSource
com.webobjects.eocontrol.EODataSource
null
public EODataSource dataSourceQualifiedByKey(String key)
EODataSource
qualifyWithRelationshipKey
to set a specific master object or to
change the relationship key
.dataSourceQualifiedByKey
in class EODataSource
com.webobjects.eocontrol.EODataSource
key
- the relationship keyexception
- on EODataSource's implementation.EODataSource.qualifyWithRelationshipKey( String key, Object sourceObject)
public void deleteObject(Object eo)
EODataSource
deleteObject
in class EODataSource
com.webobjects.eocontrol.EODataSource
eo
- the object to be deletedexception
- on EODataSource
's implementationpublic EOEditingContext editingContext()
EODataSource
editingContext
in class EODataSource
com.webobjects.eocontrol.EODataSource
null
when implemented by EODataSourcepublic boolean fetchEnabled()
true
if fetching is enabled; false
otherwisepublic NSArray fetchObjects()
null
otherwise.fetchObjects
in class EODataSource
null
if fetching is not enabledpublic EOFetchSpecification fetchSpecification()
setFetchSpecification
or setAuxiliaryQualifier
).setFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
,
setAuxiliaryQualifier(com.webobjects.eocontrol.EOQualifier)
public void insertObject(Object eo)
EODataSource
insertObject
in class EODataSource
com.webobjects.eocontrol.EODataSource
eo
- the object to be insertedexception
- on EODataSource's implementationpublic void qualifyWithRelationshipKey(String key, Object sourceObject)
key
belonging
to the source object sourceObject
(owner of the relationship).
key
should be the same as the key specified in the
dataSourceQualifiedByKey
method. If sourceObject
is null
,
no objects are provided. If the relationship named by key
can't be
found, an IllegalStateException
is thrown. The source object must be an EOEnterpriseObject.qualifyWithRelationshipKey
in class EODataSource
key
- name of the relationshipsourceObject
- the source object (owner of the relationship), an EOEnterpriseObjectpublic void setAuxiliaryQualifier(EOQualifier qualifier)
qualifier
as an auxiliary qualifier to the receiver's fetch
specification. This qualifier is combined with the qualifier with
the fetch specification with an AND operation.qualifier
- the auxilary qualifierpublic void setEditingContext(EOEditingContext editingContext)
editingContext
is null
, fetching is disabled.editingContext
- the editing contextpublic void setFetchEnabled(boolean fetchEnabled)
fetchEnabled
- true
if fetching is enabled; false
otherwisepublic void setFetchSpecification(EOFetchSpecification fetchSpecification)
fetchSpecification
to the receiver as the fetch
specification to use when fetching objects.fetchSpecification
- the fetch specificationpublic void setFetchSpecificationName(String name)
|
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 |