|
Project Wonder 5.0.0.8795 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecter.extensions.eof.ERXEnterpriseObjectChangeListener<T>
public abstract class ERXEnterpriseObjectChangeListener<T extends EOEnterpriseObject>
Listens to EOEditingContextDidSaveChanges notifications to track changes on a given entity and calls the entitiesChanged method when the entity changes.
| Field Summary | |
|---|---|
static String |
ClearCacheNotification
|
| Constructor Summary | |
|---|---|
ERXEnterpriseObjectChangeListener(Class c,
boolean trackAllChanges,
boolean deep)
Constructs an ERXEnterpriseChangeListener. |
|
ERXEnterpriseObjectChangeListener(String entityName,
boolean trackAllChanges,
boolean deep)
Constructs an ERXEnterpriseChangeListener. |
|
| Method Summary | |
|---|---|
abstract void |
clearCache()
Called when a clear cache request has been received. |
void |
clearCache(NSNotification n)
Handler for the clearCaches notification. |
void |
editingContextDidSaveChanges(NSNotification n)
Handler for the editingContextDidSaveChanges notification. |
abstract void |
entitiesChanged(NSArray<T> entitiesInserted,
NSArray<T> entitiesUpdated,
NSArray<T> entitiesDeleted)
Called when the entity being listened to changes. |
protected String |
entityName()
Returns the name of the entity this cache is watching. |
protected boolean |
isRelevant(EOEditingContext editingContext,
String changedEntityName)
Returns true if the changed entity name matches the watched entity name, or if this change listener is "deep," if the changed entity name is a |
protected void |
registerForNotifications()
|
protected NSArray<T> |
relevantChanges(EOEditingContext editingContext,
NSDictionary dict,
String key)
Helper to check if an array of EOs contains the handled entity or its subclasses (if deep). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String ClearCacheNotification
| Constructor Detail |
|---|
public ERXEnterpriseObjectChangeListener(Class c,
boolean trackAllChanges,
boolean deep)
c - the class name of the entity to watch for changestrackAllChanges - if true, entitiesChanged will pass the array of all changed
EO's (slightly slower)deep - if true, subentities of the given entity will be considered
relevent to this change listener
public ERXEnterpriseObjectChangeListener(String entityName,
boolean trackAllChanges,
boolean deep)
entityName - the entity name to watch for changestrackAllChanges - if true, entitiesChanged will pass the array of all changed
EO's (slightly slower)deep - if true, subentities of the given entity will be considered
relevent to this change listener| Method Detail |
|---|
protected void registerForNotifications()
protected NSArray<T> relevantChanges(EOEditingContext editingContext,
NSDictionary dict,
String key)
editingContext - the editingContext containing the changesdict - the notification's userInfo dictionarykey - the inserted/updated/deleted key
protected boolean isRelevant(EOEditingContext editingContext,
String changedEntityName)
editingContext - the editing context containing the changeschangedEntityName - the name of the changed entity
public void editingContextDidSaveChanges(NSNotification n)
n - public void clearCache(NSNotification n)
n - protected String entityName()
public abstract void entitiesChanged(NSArray<T> entitiesInserted,
NSArray<T> entitiesUpdated,
NSArray<T> entitiesDeleted)
entitiesInserted - entities of this type were inserted, if null, it was not
checkedentitiesUpdated - entities of this type were updated, if null, it was not
checkedentitiesDeleted - entities of this type were deleted, if null, it was not
checkedpublic abstract void clearCache()
|
Last updated: Fri, Jan 9, 2009 04:35 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||