Project Wonder 5.0.0.8795

er.extensions.foundation
Class ERXArrayUtilities.FetchSpecOperator

java.lang.Object
  extended by er.extensions.foundation.ERXArrayUtilities.FetchSpecOperator
All Implemented Interfaces:
NSArray.Operator
Enclosing class:
ERXArrayUtilities

public static class ERXArrayUtilities.FetchSpecOperator
extends Object
implements NSArray.Operator

Define an 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.


Constructor Summary
ERXArrayUtilities.FetchSpecOperator()
          public empty constructor
 
Method Summary
 Object compute(NSArray array, String keypath)
          Filters and sorts the given array by the named fetchspecification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXArrayUtilities.FetchSpecOperator

public ERXArrayUtilities.FetchSpecOperator()
public empty constructor

Method Detail

compute

public Object compute(NSArray array,
                      String keypath)
Filters and sorts the given array by the named fetchspecification.

Specified by:
compute in interface NSArray.Operator
Parameters:
array - array to be filtered.
keypath - name of fetch specification.
Returns:
immutable filtered array.

Last updated: Fri, Jan 9, 2009 • 04:35 AM EST

Copyright © 2002 – 2007 Project Wonder.