ERXBatchFetchUtilities.KeyPath Class Reference

Collaboration diagram for ERXBatchFetchUtilities.KeyPath:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 KeyPath (String path, NSArray subPaths)
String path ()
NSArray subPaths ()
void traverseForObjects (NSArray sourceObjects, boolean skipFaultedSourceObjects)

Static Public Member Functions

static NSArray< KeyPathparseKeyPathStrings (NSArray keypathStrings)

Private Member Functions

void batchFetchRelationshipOnSourceObjects (EORelationship relationship, NSArray sourceObjects, boolean skipFaultedSourceObjects)
NSArray destinationObjectsForRelationship (EORelationship relationship, NSArray sourceObjects)
NSDictionary splitObjectsByEntity (NSArray objects)
void traverseForHomogeniousObjects (NSArray sourceObjects, boolean skipFaultedSourceObjects)

Static Private Member Functions

static String directPathFromKeyPath (String keypath)
static String indirectPathFromKeyPath (String keypath)
static NSDictionary subPathsKeyedByTopLevel (NSArray keypathStrings)

Private Attributes

String path
NSArray subPaths


Detailed Description

This class represent a keypath as a hierarchical tree structure(path and subPaths similar to directory and subDirectory).

Author:
lenny

Constructor & Destructor Documentation

KeyPath ( String  path,
NSArray  subPaths 
)


Member Function Documentation

void batchFetchRelationshipOnSourceObjects ( EORelationship  relationship,
NSArray  sourceObjects,
boolean  skipFaultedSourceObjects 
) [private]

NSArray destinationObjectsForRelationship ( EORelationship  relationship,
NSArray  sourceObjects 
) [private]

static String directPathFromKeyPath ( String  keypath  )  [static, private]

static String indirectPathFromKeyPath ( String  keypath  )  [static, private]

static NSArray<KeyPath> parseKeyPathStrings ( NSArray  keypathStrings  )  [static]

Take a list of keypath strings and return a list or KeyPath objects.

  ex. from
  manuscriptEvents.userAction.enteredBy
  manuscriptEvents.userAction.changedBy
  manuscriptEvents.correspondence.enteredBy
  deniedIndividuals

  to:

  1. manuscriptEvents.
  					userAction.
  							   enteredBy
                              changedBy
  2. manuscriptEvents.
  				    correspondence.
  								   enteredBy
  3. deniedIndividuals

 

Parameters:
keypathStrings 
Returns:

String path (  ) 

NSDictionary splitObjectsByEntity ( NSArray  objects  )  [private]

NSArray subPaths (  ) 

static NSDictionary subPathsKeyedByTopLevel ( NSArray  keypathStrings  )  [static, private]

void traverseForHomogeniousObjects ( NSArray  sourceObjects,
boolean  skipFaultedSourceObjects 
) [private]

void traverseForObjects ( NSArray  sourceObjects,
boolean  skipFaultedSourceObjects 
)

Traverse through all relationships represented by this keypath for sourceObjects using batchFetching to optimize roundtrips to database.

This method assumes the EOObjectStoreCoordinator has been externally locked.

See also:
EOFUtils.batchFetch
Parameters:
sourceObjects 


Member Data Documentation

String path [private]

NSArray subPaths [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:07 2012 for Project Wonder by  doxygen 1.5.8