public static class ERXArrayUtilities.FetchSpecOperator extends Object
NSArray.Operator
for the key fetchSpec.
This allows for key value paths like:
myArray.valueForKey("@fetchSpec.fetchUsers");
Which in this case would return myArray filtered and sorted by the
EOFetchSpecification named "fetchUsers" which must be a model-based fetchspec
in the first object's entity.BaseOperator
Constructor and Description |
---|
FetchSpecOperator() |
Modifier and Type | Method and Description |
---|---|
Object |
compute(NSArray array,
String keypath)
Filters and sorts the given array by the named fetchspecification.
|
Object |
contents(NSArray<?> array,
String keypath)
Rather than iterating through the array argument calling
valueForKeyPath
on each array object, this method operates by calling
valueForKeyPath
on the array argument instead. |
public Object compute(NSArray array, String keypath)
array
- array to be filtered.keypath
- name of fetch specification.public Object contents(NSArray<?> array, String keypath)
valueForKeyPath
on each array object, this method operates by calling
valueForKeyPath
on the array argument instead. This method is used by Wonder operators to chain
multiple array operators in a single key path.array
- the array value for the operatorkeypath
- the keypath to call on the array argumentCopyright © 2002 – 2020 Project Wonder.