
ERXKeyFilter is a hierarchical mapping between ERXKeys (single key, not keypaths), whether an include or exclude rule should be applied for that key, and if it's an include, the next set of filter rules to apply to the destination object.
ERXKeyFilter companyFilter = ERXKeyFilter.filterWithAttribtues(); ERXKeyFilter remindersFilter = companyFilter.include(Company.REMINDERS); remindersFilter.include(Reminder.SUMMARY); ERXKeyFilter reminderAuthorFilter = remindersFilter.include(Reminder.AUTHOR); reminderAuthorFilter.includeAll(); reminderAuthorFilter.exclude(Author.HUGE_RELATIONSHIP);
more method comments to come ...
| enum Base |
ERXKeyFilter.Base defines the base rule that is applied to a filter.
| ERXKeyFilter | ( | ERXKeyFilter.Base | base | ) |
| ERXKeyFilter | ( | ERXKeyFilter.Base | base, | |
| ERXKeyFilter.Base | nextBase | |||
| ) |
Creates a new ERXKeyFilter.
| base | the base rule to apply | |
| nextBase | the next base rule to apply |
| ERXKeyFilter _filterForKey | ( | ERXKey | key | ) |
Returns the filter for the given key, or creates a "nextBase" filter if there isn't one. This should usually only be called when you know exactly what you're doing, as this doesn't fully interpret include/exclude rules.
| key | the key to lookup |
| void addMap | ( | ERXKey | fromKey, | |
| ERXKey | toKey | |||
| ) |
Adds a key mapping to this filter.
| fromKey | the key to map from | |
| toKey | the key to map to |
| ERXKeyFilter.Base base | ( | ) |
Returns the base rule for this filter.
| ERXKeyFilter.Delegate delegate | ( | ) |
Returns the filter delegate for this filter.
| void exclude | ( | ERXKey... | keys | ) |
Excludes the given keys from this filter.
| keys | the keys to exclude |
| boolean excludes | ( | ERXKey | key | ) |
Returns whether or not the given key is excluded.
| key | the key to lookup |
| NSSet<ERXKey> excludes | ( | ) |
Returns the set of keys that are explicitly excluded.
| static ERXKeyFilter filterWithAll | ( | ) | [static] |
Shortcut to return a new ERXKeyFilter(All)
| static ERXKeyFilter filterWithAllRecursive | ( | ) | [static] |
Shortcut to return a new ERXKeyFilter(All, All)
| static ERXKeyFilter filterWithAttributes | ( | ) | [static] |
Shortcut to return a new ERXKeyFilter(Attributes)
| static ERXKeyFilter filterWithAttributesAndToOneRelationships | ( | ) | [static] |
Shortcut to return a new ERXKeyFilter(AttributesAndToOneRelationships)
| static ERXKeyFilter filterWithKeys | ( | ERXKey<?>... | keys | ) | [static] |
Shortcut to return a new ERXKeyFilter()
| keys | the keys to include |
| static ERXKeyFilter filterWithNone | ( | ) | [static] |
Shortcut to return a new ERXKeyFilter(None)
| ERXKeyFilter include | ( | ERXKey | key | ) |
Includes the given key in this filter.
| key | the key to include |
| void include | ( | ERXKey... | keys | ) |
Includes the given set of keys in this filter.
| keys | the keys to include |
| void includeAll | ( | ) |
Sets the base rule to All.
| void includeAttributes | ( | ) |
Sets the base rule to Attributes.
| void includeAttributesAndToOneRelationships | ( | ) |
Sets the base rule to AttribtuesAndToOneRelationships.
| void includeNone | ( | ) |
Sets the base rule to None.
| boolean includes | ( | ERXKey | key | ) |
Returns whether or not the given key is included in this filter.
| key | the key to lookup |
| NSDictionary<ERXKey, ERXKeyFilter> includes | ( | ) |
Returns the included keys and the next filters they map to.
| public<T> ERXKey<T> keyMap | ( | ERXKey< T > | fromKey | ) | [package] |
Returns the key that is mapped to from the given input key.
| <T> | the type of the key (which doesn't change) | |
| fromKey | the key to map from |
| boolean lockedRelationship | ( | ERXKey | key | ) |
Returns whether or not the given relationship is locked (i.e. value's attributes can be updated but not the relationship cannot be changed).
| key | the key to lookup |
| NSSet<ERXKey> lockedRelationships | ( | ) |
Returns the set of relationships that are locked (i.e. cannot be replaced).
| void lockRelationship | ( | ERXKey... | keys | ) |
Locks the given relationship on this filter.
| keys | the relationships to lock |
| boolean matches | ( | ERXKey | key, | |
| ERXKey.Type | type | |||
| ) |
Returns whether or not the given key (of the given type, if known) is included in this filter.
| key | the key to lookup | |
| type | the type of the key (if known) |
| ERXKeyFilter.Base nextBase | ( | ) |
Returns the base that is used for subkeys of this key by default.
| ERXKeyFilter only | ( | ERXKey | key | ) |
Restricts this filter to only allow the given key.
| key | the only key to allow |
| void only | ( | ERXKey... | keys | ) |
Restricts this filter to only allow the given keys.
| keys | the keys to restrict to |
| void setBase | ( | ERXKeyFilter.Base | base | ) |
Sets the base rule.
| base | the base rule |
| void setDelegate | ( | ERXKeyFilter.Delegate | delegate | ) |
Associate a filter delegate with this filter.
| delegate | the delegate to associate |
| ERXKeyFilter setNextBase | ( | ERXKeyFilter.Base | nextBase | ) |
Sets the base that is used for subkeys of this key by default.
| nextBase | the base that is used for subkeys of this key by default |
| String toString | ( | ) |
ERXKeyFilter.Base _base [private] |
ERXKeyFilter.Delegate _delegate [private] |
NSMutableSet<ERXKey> _excludes [private] |
NSMutableDictionary<ERXKey, ERXKeyFilter> _includes [private] |
NSMutableSet<ERXKey> _lockedRelationships [private] |
NSMutableDictionary<ERXKey, ERXKey> _map [private] |
ERXKeyFilter.Base _nextBase [private] |
1.5.8