PATH |
Inherits from: Object
Package: com.webobjects.eoaccess
EOUtilities is a collection of convenience methods intended to make common operations with EOF easier. EOUtilities is an EOAccess class that consists entirely of static methods-you never instantiate an EOUtilities object.
Each method requires an editing context into which the objects should be fetched; this editing context is passed as the first argument to each method in EOUtilities.
Note: The Objective-C source code for EOUtilities is available as an example. On Mac OS X Server systems, see /System/Developer/Examples/EnterpriseObjects/Sources/EOUtilities. On NT, see $NEXT_ROOT\Developer\Examples\EnterpriseObjects\Sources\EOUtilities. |
Creating new objects createAndInsertInstance Fetching multiple objects objectsForEntityNamed objectsWithQualifierFormat objectsMatchingKeyAndValue objectsMatchingValues objectsOfClass objectsWithFetchSpecificationAndBindings Fetching single objects objectWithQualifierFormat objectMatchingKeyAndValue objectMatchingValues objectWithFetchSpecificationAndBindings objectWithPrimaryKey objectWithPrimaryKeyValue Fetching raw rows executeStoredProcedureNamed objectFromRawRow rawRowsWithQualifierFormat rawRowsMatchingKeyAndValue rawRowsMatchingValues rawRowsForSQL rawRowsForStoredProcedureNamed Accessing the EOF stack connectWithModelNamed databaseContextForModelNamed Accessing object data destinationKeyForSourceObject localInstanceOfObject localInstancesOfObjects primaryKeyForObject Accessing model information entityForClass entityForObject entityNamed modelGroup
public static void connectWithModelNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String modelName, NSDictionary overrides)
public static com.webobjects.eocontrol.EOEnterpriseObject createAndInsertInstance( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName)
public static EODatabaseContext databaseContextForModelNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String modelName)
public static NSDictionary destinationKeyForSourceObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object, String relationshipName)
Department.ID
and Employee.deptID
, invoking this method on a Department object with ID equal to 5 returns a dictionary with a value of 5 for the deptID
key.
See Also: primaryKeyForObject
public static EOEntity entityForClass( com.webobjects.eocontrol.EOEditingContext editingContext, Class classObject)
See Also: entityForObject, entityNamed, objectsOfClass
public static EOEntity entityForObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object)
See Also: entityForClass, entityNamed
public static EOEntity entityNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName)
See Also: entityForClass, entityForObject
public static NSDictionary executeStoredProcedureNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String storedProcedureName, NSDictionary arguments)
See Also: rawRowsForStoredProcedureNamed
public static com.webobjects.eocontrol.EOEnterpriseObject localInstanceOfObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object)
See Also: localInstancesOfObjects
public static NSArray localInstancesOfObjects( com.webobjects.eocontrol.EOEditingContext editingContext, NSArray objects)
See Also: localInstanceOfObject
public static EOModelGroup modelGroup(com.webobjects.eocontrol.EOEditingContext editingContext)
public static com.webobjects.eocontrol.EOEnterpriseObject objectFromRawRow( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary row)
public static com.webobjects.eocontrol.EOEnterpriseObject objectMatchingKeyAndValue( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String key, Object value)
exception unless exactly one object is retrieved.
See Also: objectMatchingValues, objectsMatchingKeyAndValue
public static com.webobjects.eocontrol.EOEnterpriseObject objectMatchingValues( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary values)
exception unless exactly one object is retrieved.
See Also: objectMatchingKeyAndValue, objectsMatchingValues
public static NSArray objectsForEntityNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName)
See Also: objectsWithQualifierFormat, objectsMatchingKeyAndValue, objectsMatchingValues
public static NSArray objectsMatchingKeyAndValue( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String key, Object value)
See Also: objectMatchingKeyAndValue, objectsForEntityNamed, objectsMatchingValues
public static NSArray objectsMatchingValues( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary values)
See Also: objectMatchingValues, objectsForEntityNamed, objectsMatchingKeyAndValue
public static NSArray objectsOfClass( com.webobjects.eocontrol.EOEditingContext editingContext, Class classObject)
exception if more than one entity for the class exists.
See Also: entityForClass
public static NSArray objectsWithFetchSpecificationAndBindings( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String fetchSpecName, NSDictionary bindings)
See Also: objectWithFetchSpecificationAndBindings
public static NSArray objectsWithQualifierFormat( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String format, NSArray arguments)
See Also: objectWithQualifierFormat, objectsForEntityNamed
public static com.webobjects.eocontrol.EOEnterpriseObject objectWithFetchSpecificationAndBindings( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String fetchSpecName, NSDictionary bindings)
exception unless exactly one object is retrieved.
See Also: objectsWithFetchSpecificationAndBindings
public static com.webobjects.eocontrol.EOEnterpriseObject objectWithPrimaryKey( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary keyDictionary)
exception unless exactly one object is retrieved.
See Also: objectMatchingKeyAndValue, objectWithPrimaryKeyValue, primaryKeyForObject
public static com.webobjects.eocontrol.EOEnterpriseObject objectWithPrimaryKeyValue( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, Object value)
exception unless exactly one object is retrieved.
See Also: objectsMatchingValues, objectWithPrimaryKey
public static com.webobjects.eocontrol.EOEnterpriseObject objectWithQualifierFormat( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String format, NSArray arguments)
exception unless exactly one object is retrieved.
See Also: objectsWithQualifierFormat, rawRowsWithQualifierFormat
public static NSDictionary primaryKeyForObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object)
See Also: objectWithPrimaryKey, objectWithPrimaryKeyValue
public static NSArray rawRowsForSQL( com.webobjects.eocontrol.EOEditingContext editingContext, String modelName, String sqlString)
See Also: rawRowsWithQualifierFormat, rawRowsForStoredProcedureNamed
public static NSArray rawRowsForStoredProcedureNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String storedProcedureName, NSDictionary arguments)
See Also: rawRowsForSQL
public static NSArray rawRowsMatchingKeyAndValue( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String key, Object value)
See Also: objectMatchingKeyAndValue, objectsMatchingKeyAndValue, rawRowsMatchingValues
public static NSArray rawRowsMatchingValues( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary values)
See Also: objectMatchingValues, objectsMatchingValues, rawRowsMatchingKeyAndValue
public static NSArray rawRowsWithQualifierFormat( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String format, NSArray arguments)
See Also: objectsWithQualifierFormat, rawRowsForSQL
© 2001 Apple Computer, Inc. (Last Published April 13, 2001)