PATH Documentation > WebObjects

Table of Contents

EODistributedDataSource


Inherits from:
EODataSource : Object
Package:
com.webobjects.eodistribution.client



Class Description


EODistributedDataSource is a concrete subclass of EODataSource (defined in EOControl) that fetches using an EOEditingContext as its source of objects; the editing context, in turn, forwards the fetch requests to its 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.




Method Types


Fetching objects
fetchObjects
setFetchSpecification
fetchSpecification
setAuxiliaryQualifier
Enabling fetching
setFetchEnabled
fetchEnabled
setEditingContext



Constructors



EODistributedDataSource

public EODistributedDataSource(String entityName)

public EODistributedDataSource( EOEditingContext anEditingContext, String entityName)

public EODistributedDataSource( EOEditingContext anEditingContext, String entityName, String fetchSpecification)

Creates and returns a new EODistributedDataSource for the entity identified by entityName. If anEditingContext 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 setEditingContext; until you do, fetching is disabled. The three-argument constructor allows you to designate a fetch specification (fetchSpecification) to be used by the initialized instance.

See Also: setFetchEnabled




Instance Methods



fetchEnabled

public boolean fetchEnabled()

Returns true if fetching is enabled, false if not.

See Also: EODistributedDataSource constructor, setFetchEnabled, setEditingContext



fetchObjects

public NSArray fetchObjects()

If fetching is enabled, fetches and returns objects with the receiver's fetch specification; returns null otherwise.



fetchSpecification

public EOFetchSpecification fetchSpecification()

Returns the receiver's fetch specification, which fetches all the objects for the receiver's entity until it is further restricted with setFetchSpecification or setAuxiliaryQualifier.



setAuxiliaryQualifier

public void setAuxiliaryQualifier(EOQualifier aQualifier)

Assigns auxiliary qualifier aQualifier to the receiver's fetch specification. This qualifier is combined with the qualifier with the fetch specification with an AND.



setEditingContext

public void setEditingContext(EOEditingContext anEditingContext)

Sets the receiver's editing context to anEditingContext. If anEditingContext is null, fetching is disabled.

See Also: setFetchEnabled



setFetchEnabled

public void setFetchEnabled(boolean flag)

Sets whether or not fetching is enabled in the receiver.

See Also: EODistributedDataSource constructor, setEditingContext



setFetchSpecification

public void setFetchSpecification(EOFetchSpecification fetchSpec)

Assigns fetchSpec to the receiver as the fetch specification to use when fetching objects.

See Also: fetchSpecification



© 2001 Apple Computer, Inc. (Last Published April 17, 2001)


Table of Contents