PATH  Documentation > WebObjects 4.5 > EOControl Reference

Table of Contents

EOEditingContextDataSource


Inherits from:
EODataSource : Object
Package:
com.apple.client.eocontrol


Class Description


EOEditingContextDataSource is a concrete subclass of EODataSource that uses an EOEditingContext as its source of objects.


Note: This class doesn't exist in the com.apple.yellow.eocontrol package.

EOEditingContextDataSource 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.

EOEditingContextDataSource provides several methods in addition to those defined by EODataSource. The additional methods- fetchEnabled and setFetchEnabled, fetchSpecification and setFetchSpecification, and setQualifier-are added to support enabling and disabling fetching and to support fetching with an EOFetchSpecification.




Method Types


Constructors
EOEditingContextDataSource
Fetching objects
fetchObjects
setFetchSpecification
fetchSpecification
setQualifier
Enabling fetching
setFetchEnabled
fetchEnabled
setEditingContext


Constructors



EOEditingContextDataSource

public EOEditingContextDataSource(String entityName)

public EOEditingContextDataSource( EOEditingContext anEditingContext, String entityName)

Creates and returns a new EOEditingContextDataSource for the entity identified by entityName. If anEditingContext is provided, the new data source uses it as its source of objects, and fetching on the new data source is enabled. If anEditingContext isn't provided, you must assign one with setEditingContext; until you assign one, fetching is disabled.

See Also: setFetchEnabled




Instance Methods



fetchEnabled

public boolean fetchEnabled()

Returns true if fetching is enabled, false if not.

See Also: EOEditingContextDataSource constructor, setFetchEnabled, setEditingContext



fetchObjects

public NSArray fetchObjects()

If fetching is enabled, fetches and returns objects with the receiver's fetch specification; 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 setQualifier.

setEditingContext

public void setEditingContext(EOEditingContext anEditingContext)

Sets the receiver's editing context to anEditingContext. If anEditingContext is non-null, fetching is enabled.

See Also: setFetchEnabled



setFetchEnabled

public void setFetchEnabled(boolean flag)

Sets whether or not fetching is enabled in the receiver.

See Also: EOEditingContextDataSource 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



setQualifier

public void setQualifier(EOQualifier aQualifier)

Assigns aQualifier to the receiver's fetch specification.


Table of Contents