er.extensions.eof
Class ERXArrayFaultCache
java.lang.Object
er.extensions.eof.ERXArrayFaultCache
public class ERXArrayFaultCache
- extends java.lang.Object
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
Method Summary |
boolean |
clearFault(java.lang.Object obj)
Attempts to clear a fault by looking up the source global id and faulting in the corresponding
destination values. |
void |
registerRelationshipCacheEntries(java.lang.String entityName,
java.lang.String relationshipName,
com.webobjects.foundation.NSDictionary entries)
Register the to-many faults by entity name and relationship name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXArrayFaultCache
public ERXArrayFaultCache()
registerRelationshipCacheEntries
public void registerRelationshipCacheEntries(java.lang.String entityName,
java.lang.String relationshipName,
com.webobjects.foundation.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
-
clearFault
public boolean clearFault(java.lang.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
Copyright © 2002 – 2007 Project Wonder.