PATH |
- Inherits from:
- EODataSource : Object
- Package:
- com.webobjects.eodistribution.client
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.
- Fetching objects
- fetchObjects
- setFetchSpecification
- fetchSpecification
- setAuxiliaryQualifier
- Enabling fetching
- setFetchEnabled
- fetchEnabled
- setEditingContext
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
public boolean fetchEnabled()
Returns true if fetching is enabled, false if not.
See Also: EODistributedDataSource constructor, setFetchEnabled, setEditingContext
public NSArray fetchObjects()
If fetching is enabled, fetches and returns objects with the receiver's fetch specification; returns null otherwise.
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.
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.
public void setEditingContext(EOEditingContext anEditingContext)
Sets the receiver's editing context to anEditingContext. If anEditingContext is null, fetching is disabled.
See Also: setFetchEnabled
public void setFetchEnabled(boolean flag)
Sets whether or not fetching is enabled in the receiver.
See Also: EODistributedDataSource constructor, setEditingContext
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)