ERXBatchFetchUtilities Class Reference

Inherited by ERXRecursiveBatchFetching.

Collaboration diagram for ERXBatchFetchUtilities:

Collaboration graph
[legend]

List of all members.

Classes

class  KeyPath

Static Public Member Functions

static void batchFetch (NSArray sourceObjects, NSArray keypaths, boolean skipFaultedSourceObjects, int batchSize)
static void batchFetch (NSArray sourceObjects, NSArray keypaths, boolean skipFaultedSourceObjects)
static void batchFetch (NSArray sourceObjects, String keypath, boolean skipFaultedSourceObjects)
static void batchFetch (NSArray sourceObjects, String keypath)
static void batchFetch (EOEnterpriseObject sourceObject, NSArray keypaths, boolean skipFaultedSourceObjects)
static void batchFetch (NSArray<?extends EOEnterpriseObject > sourceObjects, ERXKey<?>...keys)
static void batchFetch (NSArray sourceObjects, NSArray keypaths)
static NSArray batchFetchAndRetrieve (NSArray sourceObjects, String keypath, boolean skipFaultedSourceObjects)
static NSArray batchFetchAndRetrieve (NSArray sourceObjects, String keypath)

Static Private Attributes

static Logger log = Logger.getLogger(ERXBatchFetchUtilities.class)


Detailed Description

ERXBatchFetchUtilities provides a collection of methods to support efficiently batch fetching arbitrarily deep keypaths on EOs.

Author:
Lenny Marks (lenny@aps.org)

Member Function Documentation

static void batchFetch ( NSArray  sourceObjects,
NSArray  keypaths,
boolean  skipFaultedSourceObjects,
int  batchSize 
) [static]

Overloads batchFetch(NSArray, NSArray, boolean) to batch through the NSArray of sourceObjects batchSize at a time.

See also:
batchFetch(NSArray, NSArray, boolean)
Author:
aman - Mar 11, 2009
Parameters:
sourceObjects 
keypaths 
skipFaultedSourceObjects 
batchSize 

static void batchFetch ( NSArray  sourceObjects,
NSArray  keypaths,
boolean  skipFaultedSourceObjects 
) [static]

Batch fetch relationships specified by keypaths for sourceObjects .

This method will use EODatabaseContext.batchFetchRelationship to efficiently fetch like relationships for many objects in as few as one database round trip per relationship.

For example, if fetching from Movie entities, you might specify paths of the form: ("directors","roles.talent", "plotSummary"). This works much like prefetching with fetch specifications, however this implementation is able to work around inheritance where prefetching fails.

Parameters:
sourceObjects the array of source objects to fault keypaths on.
keypaths the array of keypaths to fault
skipFaultedSourceObjects if true, all source objects that already have their relationships faulted will be skipped

static void batchFetch ( NSArray  sourceObjects,
String  keypath,
boolean  skipFaultedSourceObjects 
) [static]

Shortcut for batch fetching a single keypath.

See also:
batchFetch(NSArray, NSArray, boolean)
Parameters:
sourceObjects the array of source object to fault keypaths on.
keypath the keypath to fault
skipFaultedSourceObjects if true, all source objects that already have their relationships faulted will be skipped

static void batchFetch ( NSArray  sourceObjects,
String  keypath 
) [static]

Shortcut for batch fetching a single keypath. Defaults skipFaultedSourceObjects to true

See also:
batchFetch(NSArray, NSArray, boolean)
Parameters:
sourceObjects the array of source object to fault keypaths on.
keypath the keypath to fault

static void batchFetch ( EOEnterpriseObject  sourceObject,
NSArray  keypaths,
boolean  skipFaultedSourceObjects 
) [static]

Shortcut for batch fetching a single source object

See also:
batchFetch(NSArray, NSArray, boolean)
Parameters:
sourceObject source object to fault keypaths on.
keypaths the array of keypaths to fault
skipFaultedSourceObjects if true, all source objects that already have their relationships faulted will be skipped

static void batchFetch ( NSArray<?extends EOEnterpriseObject >  sourceObjects,
ERXKey<?>...  keys 
) [static]

Batch key the list of keys from the given source objects. No backwards compatibility here, so skipFaultedSourceObject is true.

Parameters:
sourceObjects the array of source object to fault keypaths on.
keys the array of ERXKeys to fault

static void batchFetch ( NSArray  sourceObjects,
NSArray  keypaths 
) [static]

Defaults skipFaultedSourceObjects to false for backwards compatibility

See also:
batchFetch(NSArray, NSArray, boolean)
Parameters:
sourceObjects the array of source object to fault keypaths on.
keypaths the array of keypaths to fault

static NSArray batchFetchAndRetrieve ( NSArray  sourceObjects,
String  keypath,
boolean  skipFaultedSourceObjects 
) [static]

Shortcut for batch fetching a single keypath and returns returns the fetched values.

See also:
batchFetch(NSArray, NSArray, boolean)
Parameters:
sourceObjects the array of source object to fault keypaths on.
keypath the keypath to fault
skipFaultedSourceObjects if true, all source objects that already have their relationships faulted will be skipped

static NSArray batchFetchAndRetrieve ( NSArray  sourceObjects,
String  keypath 
) [static]

Shortcut for batch fetching a single keypath and returns returns the fetched values. Defaults skipFaultedSourceObjects to true

See also:
batchFetch(NSArray, NSArray, boolean)
Parameters:
sourceObjects the array of source object to fault keypaths on.
keypath the keypath to fault


Member Data Documentation

Logger log = Logger.getLogger(ERXBatchFetchUtilities.class) [static, 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