public class ERXBatchFetchUtilities extends Object
Constructor and Description |
---|
ERXBatchFetchUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
batchFetch(com.webobjects.eocontrol.EOEnterpriseObject sourceObject,
NSArray keypaths,
boolean skipFaultedSourceObjects)
Shortcut for batch fetching a single source object
|
static void |
batchFetch(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> sourceObjects,
ERXKey<?>... keys)
Batch key the list of keys from the given source objects.
|
static void |
batchFetch(NSArray sourceObjects,
NSArray keypaths)
Defaults skipFaultedSourceObjects to false for backwards compatibility
|
static void |
batchFetch(NSArray sourceObjects,
NSArray keypaths,
boolean skipFaultedSourceObjects)
Batch fetch relationships specified by keypaths for
sourceObjects .
|
static void |
batchFetch(NSArray sourceObjects,
NSArray keypaths,
boolean skipFaultedSourceObjects,
int batchSize)
Overloads batchFetch(NSArray, NSArray, boolean) to batch through the
NSArray of sourceObjects batchSize at a time.
|
static void |
batchFetch(NSArray sourceObjects,
String keypath)
Shortcut for batch fetching a single keypath.
|
static void |
batchFetch(NSArray sourceObjects,
String keypath,
boolean skipFaultedSourceObjects)
Shortcut for batch fetching a single keypath.
|
static NSArray |
batchFetchAndRetrieve(NSArray sourceObjects,
String keypath)
Shortcut for batch fetching a single keypath and returns the fetched values.
|
static NSArray |
batchFetchAndRetrieve(NSArray sourceObjects,
String keypath,
boolean skipFaultedSourceObjects)
Shortcut for batch fetching a single keypath and returns the fetched values.
|
public static void batchFetch(NSArray sourceObjects, NSArray keypaths)
sourceObjects
- the array of source object to fault keypaths on.keypaths
- the array of keypaths to faultbatchFetch(NSArray, NSArray, boolean)
public static void batchFetch(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> sourceObjects, ERXKey<?>... keys)
sourceObjects
- the array of source object to fault keypaths on.keys
- the array of ERXKeys to faultpublic static void batchFetch(com.webobjects.eocontrol.EOEnterpriseObject sourceObject, NSArray keypaths, boolean skipFaultedSourceObjects)
sourceObject
- source object to fault keypaths on.keypaths
- the array of keypaths to faultskipFaultedSourceObjects
- if true, all source objects that already have their relationships faulted will be skippedbatchFetch(NSArray, NSArray, boolean)
public static void batchFetch(NSArray sourceObjects, String keypath)
sourceObjects
- the array of source object to fault keypaths on.keypath
- the keypath to faultbatchFetch(NSArray, NSArray, boolean)
public static void batchFetch(NSArray sourceObjects, String keypath, boolean skipFaultedSourceObjects)
sourceObjects
- the array of source object to fault keypaths on.keypath
- the keypath to faultskipFaultedSourceObjects
- if true, all source objects that already have their relationships faulted will be skippedbatchFetch(NSArray, NSArray, boolean)
public static NSArray batchFetchAndRetrieve(NSArray sourceObjects, String keypath)
sourceObjects
- the array of source object to fault keypaths on.keypath
- the keypath to faultbatchFetch(NSArray, NSArray, boolean)
public static NSArray batchFetchAndRetrieve(NSArray sourceObjects, String keypath, boolean skipFaultedSourceObjects)
sourceObjects
- the array of source object to fault keypaths on.keypath
- the keypath to faultskipFaultedSourceObjects
- if true, all source objects that already have their relationships faulted will be skippedbatchFetch(NSArray, NSArray, boolean)
public static void batchFetch(NSArray sourceObjects, NSArray keypaths, boolean skipFaultedSourceObjects)
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.
sourceObjects
- the array of source objects to fault keypaths on.keypaths
- the array of keypaths to faultskipFaultedSourceObjects
- if true, all source objects that already have their relationships faulted will be skippedpublic static void batchFetch(NSArray sourceObjects, NSArray keypaths, boolean skipFaultedSourceObjects, int batchSize)
sourceObjects
- keypaths
- skipFaultedSourceObjects
- batchSize
- batchFetch(NSArray, NSArray, boolean)
Copyright © 2002 – 2020 Project Wonder.