com.cassinidivision.core.eocontrol
Class EOEditingContext_Helper

java.lang.Object
  extended bycom.cassinidivision.core.eocontrol.EOEditingContext_Helper

public class EOEditingContext_Helper
extends Object

EOEditingContext-related utility methods.


Constructor Summary
EOEditingContext_Helper()
           
 
Method Summary
static void deepInsertDestinationOfRelationship(EOEditingContext helpedEC, EORelationship relationship, EOEnterpriseObject object)
          Traverse a relationship for a given EO and perform a deep insertion of any sub-EOs found there.
static void deepInsertObject(EOEditingContext helpedEC, EOEnterpriseObject object)
          Perform a deep insertion for an EO into the editing context.
static void deepInsertObjectsInArray(EOEditingContext helpedEC, NSArray objects)
          Perform deep insertions for the EOs provided into the editing context.
static NSArray fetchObjectsOfTypeWithValuesForKeysInEditingContext(String entityName, NSArray values, NSArray keys, EOEditingContext aContext)
          Deprecated. Use EOUtilities.objectsMatchingValues(EOEditingContext, String, NSDictionary) instead.
static NSArray globalIDsForObjects(EOEditingContext helpedEC, NSArray objects)
          Retrieve an array of global IDs corresponding to the enterprise objects provided.
static void refreshObjects(EOEditingContext editingContext, NSArray objects)
          Refresh an array of enterprise objects (utility method).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOEditingContext_Helper

public EOEditingContext_Helper()
Method Detail

globalIDsForObjects

public static NSArray globalIDsForObjects(EOEditingContext helpedEC,
                                          NSArray objects)
Retrieve an array of global IDs corresponding to the enterprise objects provided.

Parameters:
helpedEC - The editing context the objects are registered in.
objects - An array of EOs.
Returns:
An array of EOGlobalID instances.

fetchObjectsOfTypeWithValuesForKeysInEditingContext

public static NSArray fetchObjectsOfTypeWithValuesForKeysInEditingContext(String entityName,
                                                                          NSArray values,
                                                                          NSArray keys,
                                                                          EOEditingContext aContext)
Deprecated. Use EOUtilities.objectsMatchingValues(EOEditingContext, String, NSDictionary) instead.

Retrieve all EOs matching the key-value pairs provided.

Parameters:
entityName - The EOEntity name.
values - The EO attribute values to match against.
keys - The EO attribute names.
aContext - The editing context for the returned objects.
Returns:
Array of objects matching the key-value pairs.

deepInsertObject

public static void deepInsertObject(EOEditingContext helpedEC,
                                    EOEnterpriseObject object)
Perform a deep insertion for an EO into the editing context.

A "deep" insertion of an EO is one in which the EO itself and all objects across the EO's relationships are inserted into the context.

WARNING: No checks are undertaken for cyclic references, so please take care when invoking this method.

Parameters:
helpedEC - The editing context with which to perform the insertions.
object - The EO instance to be deep-inserted.

deepInsertDestinationOfRelationship

public static void deepInsertDestinationOfRelationship(EOEditingContext helpedEC,
                                                       EORelationship relationship,
                                                       EOEnterpriseObject object)
Traverse a relationship for a given EO and perform a deep insertion of any sub-EOs found there.

Parameters:
helpedEC - The editing context with which to perform the insertions.
relationship - The name of the traversed relationship.
object - The EO in question.
See Also:
deepInsertObject(EOEditingContext,EOEnterpriseObject)

deepInsertObjectsInArray

public static void deepInsertObjectsInArray(EOEditingContext helpedEC,
                                            NSArray objects)
Perform deep insertions for the EOs provided into the editing context.

Parameters:
helpedEC - The editing context with which to perform the insertions.
objects - The EO instances to be deep-inserted.
See Also:
deepInsertObject(EOEditingContext,EOEnterpriseObject)

refreshObjects

public static void refreshObjects(EOEditingContext editingContext,
                                  NSArray objects)
Refresh an array of enterprise objects (utility method).

Parameters:
editingContext - The editing context the EOs are registered in.
objects - An array of EOs.