ERXArrayFaultCache Class Reference

Collaboration diagram for ERXArrayFaultCache:

Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean clearFault (Object obj)
void registerRelationshipCacheEntries (String entityName, String relationshipName, NSDictionary entries)

Private Member Functions

NSDictionary relationshipCacheEntriesForEntity (String entityName, String relationshipName)

Private Attributes

NSMutableDictionary cache = new NSMutableDictionary()

Static Private Attributes

static final Logger log = Logger.getLogger(ERXArrayFaultCache.class)


Detailed Description

Provides a cache for to-many faults. Useful when you have a lot (say a few thousand) objects for which you need to access a to-many relationship that hasn't been fetched yet.

The idea is that instead of batch-faulting you could fetch all the entries for a given to-many relationship in one fetch (as raw rows), group them in memory and register the faults here. Then you set up your EODatabaseContext delegate to use this object to try and clear the fault first.

Author:
ak

Member Function Documentation

boolean clearFault ( Object  obj  ) 

Attempts to clear a fault by looking up the source global id and faulting in the corresponding destination values.

Parameters:
obj 
Returns:
true if the fault could be cleared or it wasn't a fault in the first place, false if not

void registerRelationshipCacheEntries ( String  entityName,
String  relationshipName,
NSDictionary  entries 
)

Register the to-many faults by entity name and relationship name. The entries are a dictionary where the key is the source EOGlobalID for the relationship and the values are arrays of global IDs for the destination.

Parameters:
entityName 
relationshipName 
entries 

NSDictionary relationshipCacheEntriesForEntity ( String  entityName,
String  relationshipName 
) [private]


Member Data Documentation

final Logger log = Logger.getLogger(ERXArrayFaultCache.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