public class ERXEOGlobalIDUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ERXEOGlobalIDUtilities.Info
Decrypts the byte array of NSData PKs so you get the process number or port,
host and timestamp.
|
Constructor and Description |
---|
ERXEOGlobalIDUtilities() |
Modifier and Type | Method and Description |
---|---|
static EOKeyGlobalID |
createGlobalID(String entityName,
Object[] values)
Creates a global ID for the given entity name and its primary key value(s).
|
static <T extends EOGlobalID> |
fetchObjectsWithGlobalIDs(EOEditingContext ec,
Collection<T> globalIDs)
Fetches an array of objects defined by the globalIDs in a single fetch per entity without
refreshing refetched objects.
|
static <T extends EOGlobalID> |
fetchObjectsWithGlobalIDs(EOEditingContext ec,
Collection<T> globalIDs,
boolean refreshesRefetchedObjects)
Fetches an array of objects defined by the globalIDs in a single fetch per entity.
|
static EOEnterpriseObject |
fetchObjectWithGlobalID(EOEditingContext ec,
EOGlobalID gid)
Fetches an object defined by gid without refreshing refetched objects.
|
static <T extends EOGlobalID> |
fireFaultsForGlobalIDs(EOEditingContext ec,
Collection<T> globalIDs)
Fires all faults in the given global IDs on one batch.
|
static <T extends EOGlobalID> |
fireFaultsForGlobalIDs(EOEditingContext ec,
Collection<T> globalIDs,
Collection<String> prefetchingKeypaths)
Fires all faults in the given global IDs on one batch together with their relationships.
|
static <T extends EOGlobalID> |
globalIDsGroupedByEntityName(Collection<T> globalIDs)
Groups an array of global IDs by their entity name.
|
static NSArray<EOGlobalID> |
globalIDsWithPrimaryKeyValues(String entityName,
Collection<Object> values)
Translates an array of single-value raw primary key values to EOGlobalIDs.
|
static <T extends EOGlobalID> |
primaryKeyValuesWithGlobalIDs(Collection<T> globalIDs)
Translates an array of
EOGlobalID to primary key values. |
public static <T extends EOGlobalID> NSDictionary<String,NSArray<T>> globalIDsGroupedByEntityName(Collection<T> globalIDs)
T
- subclass of EOGlobalIDglobalIDs
- list of global IDspublic static <T extends EOGlobalID> NSArray<Object> primaryKeyValuesWithGlobalIDs(Collection<T> globalIDs)
EOGlobalID
to primary key values. Throws an exception if the given
global IDs are not EOKeyGlobalIDs and the primary keys are not single values.T
- subclass of EOGlobalIDglobalIDs
- list of global IDspublic static NSArray<EOGlobalID> globalIDsWithPrimaryKeyValues(String entityName, Collection<Object> values)
entityName
- the entity name of the raw primary valuesvalues
- list of raw primary key valuespublic static EOEnterpriseObject fetchObjectWithGlobalID(EOEditingContext ec, EOGlobalID gid)
ec
- the editing context to fetch withingid
- the global ID to fetchpublic static <T extends EOGlobalID> NSMutableArray<EOEnterpriseObject> fetchObjectsWithGlobalIDs(EOEditingContext ec, Collection<T> globalIDs)
T
- subclass of EOGlobalIDec
- the editing context to fetch withinglobalIDs
- the global IDs to fetchpublic static <T extends EOGlobalID> NSMutableArray<EOEnterpriseObject> fetchObjectsWithGlobalIDs(EOEditingContext ec, Collection<T> globalIDs, boolean refreshesRefetchedObjects)
T
- subclass of EOGlobalIDec
- the editing context to fetch withinglobalIDs
- the global IDs to fetchrefreshesRefetchedObjects
- whether or not to refresh refetched objectspublic static <T extends EOGlobalID> NSArray<EOEnterpriseObject> fireFaultsForGlobalIDs(EOEditingContext ec, Collection<T> globalIDs, Collection<String> prefetchingKeypaths)
T
- subclass of EOGlobalIDec
- editing context to fault intoglobalIDs
- the global IDs to faultprefetchingKeypaths
- list of key paths to prefetch or nullpublic static <T extends EOGlobalID> NSArray<EOEnterpriseObject> fireFaultsForGlobalIDs(EOEditingContext ec, Collection<T> globalIDs)
T
- subclass of EOGlobalIDec
- editing context to fault inglobalIDs
- the global IDs to faultpublic static EOKeyGlobalID createGlobalID(String entityName, Object[] values)
entityName
- the entity namevalues
- one or more primary key valuesCopyright © 2002 – 2024 Project Wonder.