PATH |
EOUtilities
Inherits from: Object
Package: com.webobjects.eoaccess
Class Description
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. |
Method Types
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
Static Methods
connectWithModelNamed
public static void connectWithModelNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String modelName, NSDictionary overrides)
createAndInsertInstance
public static com.webobjects.eocontrol.EOEnterpriseObject createAndInsertInstance( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName)
databaseContextForModelNamed
public static EODatabaseContext databaseContextForModelNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String modelName)
destinationKeyForSourceObject
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
entityForClass
public static EOEntity entityForClass( com.webobjects.eocontrol.EOEditingContext editingContext, Class classObject)
See Also: entityForObject, entityNamed, objectsOfClass
entityForObject
public static EOEntity entityForObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object)
See Also: entityForClass, entityNamed
entityNamed
public static EOEntity entityNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName)
See Also: entityForClass, entityForObject
executeStoredProcedureNamed
public static NSDictionary executeStoredProcedureNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String storedProcedureName, NSDictionary arguments)
See Also: rawRowsForStoredProcedureNamed
localInstanceOfObject
public static com.webobjects.eocontrol.EOEnterpriseObject localInstanceOfObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object)
See Also: localInstancesOfObjects
localInstancesOfObjects
public static NSArray localInstancesOfObjects( com.webobjects.eocontrol.EOEditingContext editingContext, NSArray objects)
See Also: localInstanceOfObject
modelGroup
public static EOModelGroup modelGroup(com.webobjects.eocontrol.EOEditingContext editingContext)
objectFromRawRow
public static com.webobjects.eocontrol.EOEnterpriseObject objectFromRawRow( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary row)
objectMatchingKeyAndValue
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
objectMatchingValues
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
objectsForEntityNamed
public static NSArray objectsForEntityNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName)
See Also: objectsWithQualifierFormat, objectsMatchingKeyAndValue, objectsMatchingValues
objectsMatchingKeyAndValue
public static NSArray objectsMatchingKeyAndValue( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String key, Object value)
See Also: objectMatchingKeyAndValue, objectsForEntityNamed, objectsMatchingValues
objectsMatchingValues
public static NSArray objectsMatchingValues( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary values)
See Also: objectMatchingValues, objectsForEntityNamed, objectsMatchingKeyAndValue
objectsOfClass
public static NSArray objectsOfClass( com.webobjects.eocontrol.EOEditingContext editingContext, Class classObject)
exception if more than one entity for the class exists.
See Also: entityForClass
objectsWithFetchSpecificationAndBindings
public static NSArray objectsWithFetchSpecificationAndBindings( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String fetchSpecName, NSDictionary bindings)
See Also: objectWithFetchSpecificationAndBindings
objectsWithQualifierFormat
public static NSArray objectsWithQualifierFormat( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String format, NSArray arguments)
See Also: objectWithQualifierFormat, objectsForEntityNamed
objectWithFetchSpecificationAndBindings
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
objectWithPrimaryKey
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
objectWithPrimaryKeyValue
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
objectWithQualifierFormat
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
primaryKeyForObject
public static NSDictionary primaryKeyForObject( com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eocontrol.EOEnterpriseObject object)
See Also: objectWithPrimaryKey, objectWithPrimaryKeyValue
rawRowsForSQL
public static NSArray rawRowsForSQL( com.webobjects.eocontrol.EOEditingContext editingContext, String modelName, String sqlString)
See Also: rawRowsWithQualifierFormat, rawRowsForStoredProcedureNamed
rawRowsForStoredProcedureNamed
public static NSArray rawRowsForStoredProcedureNamed( com.webobjects.eocontrol.EOEditingContext editingContext, String storedProcedureName, NSDictionary arguments)
See Also: rawRowsForSQL
rawRowsMatchingKeyAndValue
public static NSArray rawRowsMatchingKeyAndValue( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, String key, Object value)
See Also: objectMatchingKeyAndValue, objectsMatchingKeyAndValue, rawRowsMatchingValues
rawRowsMatchingValues
public static NSArray rawRowsMatchingValues( com.webobjects.eocontrol.EOEditingContext editingContext, String entityName, NSDictionary values)
See Also: objectMatchingValues, objectsMatchingValues, rawRowsMatchingKeyAndValue
rawRowsWithQualifierFormat
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)