The methods in this section fetch data from a data source and access the properties of enterprise object instances.
(StringentityName, EOQualifierqualifier, NSArraysortOrderings)Use this method to construct a fetch specification that you use to retrieve data from a data source. Only the entityName parameter is mandatory. A fetch specification is transformed by the framework into a SQL expression in which entityName is used in the FROM clause, qualifier is used in the WHERE clause, and sortOrderings is used in the ORDER BY clause.
objectsForEntityNamed(EOEditingContexteditingContext, StringentityName)This convenience method fetches all the enterprise objects for the entity specified by entityName.
objectsWithFetchSpecification(EOFetchSpecificationfs)Use this method to retrieve data from a data source.
primaryKeyForObject(EOEditingContexteditingContext, EOEnterpriseObjectenterpriseObject)This convenience method retrieves the primary key for the enterprise object specified by enterpriseObject. You usually do not need to worry about primary keys when building an Enterprise Objects application.
qualifierWithQualifierFormat(Stringformat, NSArrayarguments)Use this method to construct a qualifier for use in a fetch specification or for use when sorting fetch results in memory.
rawRowsForSQL(EOEditingContexteditingContext, StringmodelName, StringsqlString)This convenience method evaluates the specified sqlString and uses information from the EOModel specified by modelName to retrieve the raw database rows specified by sqlString. In an Enterprise Objects application, you usually do not need to explicitly think about SQL or fetch raw rows.
valueForKey(Stringkey)This method returns an object for the property in an enterprise object specified by key. This method is part of the key-value coding infrastructure of Enterprise Objects, in which an object’s properties are accessed by key rather than directly as fields or through accessor methods. This is discussed in more detail in “Accessing an Enterprise Object’s Data.”
valueForKeyPath(StringkeyPath)This method returns an object for the property in an enterprise object’s relationship specified by keyPath, where keyPath is a String of the form “relationship.property”. This method allows you to access relationships between enterprise objects using a chain of keys. It is part of the key-value coding infrastructure of Enterprise Objects, which is discussed in more detail in “Accessing an Enterprise Object’s Data.”
Last updated: 2007-07-11