
Public Member Functions | |
| abstract void | clearCache () |
| void | clearCache (NSNotification n) |
| void | editingContextDidSaveChanges (NSNotification n) |
| abstract void | entitiesChanged (NSArray< T > entitiesInserted, NSArray< T > entitiesUpdated, NSArray< T > entitiesDeleted) |
| ERXEnterpriseObjectChangeListener (String entityName, boolean trackAllChanges, boolean deep) | |
| ERXEnterpriseObjectChangeListener (Class c, boolean trackAllChanges, boolean deep) | |
Static Public Attributes | |
| static String | ClearCacheNotification = "ERXEnterpriseObjectChangeListener.ClearCache" |
Protected Member Functions | |
| String | entityName () |
| boolean | isRelevant (EOEditingContext editingContext, String changedEntityName) |
| void | registerForNotifications () |
| NSArray< T > | relevantChanges (EOEditingContext editingContext, NSDictionary dict, String key) |
Static Private Member Functions | |
| static String | entityNameForClass (Class c) |
Private Attributes | |
| boolean | _deep |
| String | _entityName |
| boolean | _trackAllChanges |
| ERXEnterpriseObjectChangeListener | ( | Class | c, | |
| boolean | trackAllChanges, | |||
| boolean | deep | |||
| ) |
Constructs an ERXEnterpriseChangeListener.
| c | the class name of the entity to watch for changes | |
| trackAllChanges | 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 |
| ERXEnterpriseObjectChangeListener | ( | String | entityName, | |
| boolean | trackAllChanges, | |||
| boolean | deep | |||
| ) |
Constructs an ERXEnterpriseChangeListener.
| entityName | the entity name to watch for changes | |
| trackAllChanges | 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 |
| abstract void clearCache | ( | ) | [pure virtual] |
Called when a clear cache request has been received.
| void clearCache | ( | NSNotification | n | ) |
Handler for the clearCaches notification. Calls reset if n.object is the entity name.
| n |
| void editingContextDidSaveChanges | ( | NSNotification | n | ) |
Handler for the editingContextDidSaveChanges notification. Calls entitiesChanged if an object of the given entity (or its subentities) were changed.
| n |
| abstract void entitiesChanged | ( | NSArray< T > | entitiesInserted, | |
| NSArray< T > | entitiesUpdated, | |||
| NSArray< T > | entitiesDeleted | |||
| ) | [pure virtual] |
Called when the entity being listened to changes. If trackAllChanges is false, all of the arrays will be null.
| entitiesInserted | entities of this type were inserted, if null, it was not checked | |
| entitiesUpdated | entities of this type were updated, if null, it was not checked | |
| entitiesDeleted | entities of this type were deleted, if null, it was not checked |
| String entityName | ( | ) | [protected] |
Returns the name of the entity this cache is watching.
| static String entityNameForClass | ( | Class | c | ) | [static, private] |
| boolean isRelevant | ( | EOEditingContext | editingContext, | |
| String | changedEntityName | |||
| ) | [protected] |
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
| editingContext | the editing context containing the changes | |
| changedEntityName | the name of the changed entity |
| void registerForNotifications | ( | ) | [protected] |
| NSArray<T> relevantChanges | ( | EOEditingContext | editingContext, | |
| NSDictionary | dict, | |||
| String | key | |||
| ) | [protected] |
Helper to check if an array of EOs contains the handled entity or its subclasses (if deep).
| editingContext | the editingContext containing the changes | |
| dict | the notification's userInfo dictionary | |
| key | the inserted/updated/deleted key |
boolean _deep [private] |
String _entityName [private] |
boolean _trackAllChanges [private] |
String ClearCacheNotification = "ERXEnterpriseObjectChangeListener.ClearCache" [static] |
1.5.8