PATH |
EODatabaseDataSource
Inherits from: com.webobjects.eocontrol.EODataSource
Implements: Serializable
Package: com.webobjects.eoaccess
Class Description
EODatabaseDataSource is a concrete subclass of EODataSource (defined in EOControl) that fetches objects based on an EOModel, using an EODatabaseContext that services the data source's EOEditingContext (defined in EOControl). An EODatabaseDataSource can be set up to fetch all objects for its root entity, to fetch objects matching a particular EOFetchSpecification, and to further filter its fetching with an auxiliary qualifier.
EODatabaseDataSource 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.
As with other data sources, EODatabaseDataSource can also provide a detail data source. The most significant consequence of using an master-detail configuration is that the detail operates directly on the master's object graph. The EODetailDataSource has a master object and a detail key through which the detail data source accesses the its objects. The master object is simply the object that's selected in the master display group, and the detail key is the name of a relationship property in the master object. When the detail display group asks its data source to fetch, the EODetailDataSource simply gets the value for the relationship property identified by the detail key from its master object and returns it. When you add and remove objects from the detail, you're directly modifying the master's relationship array. In fact, you can think of EODetailDataSource as an interface to its master object's relationship property.
Method Types
Constructors EODatabaseDataSource Accessing selection criteria auxiliaryQualifier fetchSpecification fetchSpecificationForFetch fetchSpecificationName setAuxiliaryQualifier setFetchSpecification setFetchSpecificationByName Accessing objects used for fetching entity databaseContext Enabling fetching setFetchEnabled isFetchEnabled Accessing qualifier bindings qualifierBindingKeys qualifierBindings setQualifierBindings Other deleteObject insertObject dataSourceQualifiedByKey qualifyWithRelationshipKey
Constructors
EODatabaseDataSource
public EODatabaseDataSource( com.webobjects.eocontrol.EOEditingContext anEditingContext, String anEntityName)
public EODatabaseDataSource( com.webobjects.eocontrol.EOEditingContext anEditingContext, String anEntityName, String fetchSpecificationName)
Static Methods
decodeObject
public static Object decodeObject(NSCoder object)
decodeWithKeyValueUnarchiver
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Instance Methods
auxiliaryQualifier
public com.webobjects.eocontrol.EOQualifier auxiliaryQualifier()
See Also: fetchSpecificationForFetch, fetchSpecification
awakeFromKeyValueUnarchiver
public void awakeFromKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
awakeFromNib
public void awakeFromNib()
classDescriptionForObjects
public com.webobjects.eocontrol.EOClassDescription classDescriptionForObjects()
classForCoder
public Class classForCoder()
databaseContext
public EODatabaseContext databaseContext()
dataSourceQualifiedByKey
public com.webobjects.eocontrol.EODataSource dataSourceQualifiedByKey(String key)
deleteObject
public void deleteObject(Object anObject)
editingContext
public com.webobjects.eocontrol.EOEditingContext editingContext()
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
encodeWithKeyValueArchiver
public void encodeWithKeyValueArchiver( com.webobjects.eocontrol.EOKeyValueArchiver archiver)
entity
public EOEntity entity()
fetchObjects
public NSArray fetchObjects()
fetchSpecification
public com.webobjects.eocontrol.EOFetchSpecification fetchSpecification()
See Also: fetchSpecificationForFetch, auxiliaryQualifier
fetchSpecificationForFetch
public com.webobjects.eocontrol.EOFetchSpecification fetchSpecificationForFetch()
See Also: fetchSpecification, auxiliaryQualifier
fetchSpecificationName
public String fetchSpecificationName()
See Also: setFetchSpecificationByName
insertObject
public void insertObject(Object anObject)
isFetchEnabled
public boolean isFetchEnabled()
See Also: setFetchEnabled
qualifierBindingKeys
public NSArray qualifierBindingKeys()
See Also: setQualifierBindings
qualifierBindings
public NSDictionary qualifierBindings()
qualifyWithRelationshipKey
public void qualifyWithRelationshipKey( String key, Object sourceObject)
setAuxiliaryQualifier
public void setAuxiliaryQualifier(com.webobjects.eocontrol.EOQualifier aQualifier)
See Also: fetchSpecificationForFetch, fetchSpecification
setFetchEnabled
public void setFetchEnabled(boolean flag)
See Also: isFetchEnabled
setFetchSpecification
public void setFetchSpecification( com.webobjects.eocontrol.EOFetchSpecification fetchSpec)
See Also: setAuxiliaryQualifier, fetchSpecificationForFetch, setFetchSpecificationByName
setFetchSpecificationByName
public void setFetchSpecificationByName(String fetchSpecificationName)
See Also: fetchSpecification, fetchSpecificationName
setParentDataSourceRelationshipKey
public void setParentDataSourceRelationshipKey( com.webobjects.eocontrol.EODataSource dataSource, String key)
setQualifierBindings
public void setQualifierBindings(NSDictionary bindings)
See Also: qualifierBindingKeys
© 2001 Apple Computer, Inc. (Last Published April 13, 2001)