Re: Fetch and sort based on a given list

2012-03-11 Thread Michael Sharp
ERXS maybe.. Eo.fetchEos(ec, Eo.KEY.in(keys), ERXS.ascs(keys)); Sharpy.. On 12/03/2012, at 9:50 AM, Ted Archibald wrote: > The best I have so far is to loop through the array, but it's not the most > elegant solution in the world... > > @SuppressWarnings({ "rawtypes", "unchecked" }) > p

Re: Fetch and sort based on a given list

2012-03-11 Thread Ted Archibald
The best I have so far is to loop through the array, but it's not the most elegant solution in the world... @SuppressWarnings({ "rawtypes", "unchecked" }) public static NSArray sortedArraySortedWithKeys(NSArray array, ERXKey key, NSArray keys) { NSArray sortedArray = new NSArray(); f

Fetch and sort based on a given list

2012-03-11 Thread Ted Archibald
Is there an easy way to fetch and sort an EO given an array of keys. The qualifier is obvious, but I don't see anything obvious on how to order the fetch based on the given list. NSArray keys = ATLArrayUtilities.toNSArray((String)context().request().formValueForKey( "keys"), ","); NSArray eos =