Project Wonder 5.0

er.extensions.eof
Class ERXSortOrdering

java.lang.Object
  extended by com.webobjects.eocontrol.EOSortOrdering
      extended by er.extensions.eof.ERXSortOrdering
All Implemented Interfaces:
com.webobjects.eocontrol.EOKeyValueArchiving, com.webobjects.foundation.NSCoding, java.io.Serializable

public class ERXSortOrdering
extends com.webobjects.eocontrol.EOSortOrdering

ERXSortOrdering is an EOSortOrdering subclass that provides support for chaining (like ERXKey).

Examples:

 Person.COMPANY.dot(Company.NAME).asc().then(Person.FIRST_NAME.desc())
 

See Also:
Serialized Form
Author:
mschrag

Nested Class Summary
static class ERXSortOrdering.ERXSortOrderings
          ERXSortOrderings is an NSMutableArray that provides methods for chaining.
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOSortOrdering
com.webobjects.eocontrol.EOSortOrdering._MultipleSortValueHolder, com.webobjects.eocontrol.EOSortOrdering._MultipleValueComparator, com.webobjects.eocontrol.EOSortOrdering._SingleSortValueHolder, com.webobjects.eocontrol.EOSortOrdering._SingleValueComparator, com.webobjects.eocontrol.EOSortOrdering._SortValueHolder, com.webobjects.eocontrol.EOSortOrdering.Comparison, com.webobjects.eocontrol.EOSortOrdering.ComparisonSupport
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSCoding
com.webobjects.foundation.NSCoding._BigDecimalSupport, com.webobjects.foundation.NSCoding._BigIntegerSupport, com.webobjects.foundation.NSCoding._BooleanSupport, com.webobjects.foundation.NSCoding._ByteSupport, com.webobjects.foundation.NSCoding._CharacterSupport, com.webobjects.foundation.NSCoding._DateSupport, com.webobjects.foundation.NSCoding._DoubleSupport, com.webobjects.foundation.NSCoding._FloatSupport, com.webobjects.foundation.NSCoding._IntegerSupport, com.webobjects.foundation.NSCoding._LongSupport, com.webobjects.foundation.NSCoding._NumberSupport, com.webobjects.foundation.NSCoding._ShortSupport, com.webobjects.foundation.NSCoding._StringSupport, com.webobjects.foundation.NSCoding.Support
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving
com.webobjects.eocontrol.EOKeyValueArchiving._NullValueSupport, com.webobjects.eocontrol.EOKeyValueArchiving._NumberSupport, com.webobjects.eocontrol.EOKeyValueArchiving._TimestampSupport, com.webobjects.eocontrol.EOKeyValueArchiving.Awaking, com.webobjects.eocontrol.EOKeyValueArchiving.FinishInitialization, com.webobjects.eocontrol.EOKeyValueArchiving.Support
 
Field Summary
 
Fields inherited from class com.webobjects.eocontrol.EOSortOrdering
_CLASS, CompareAscending, CompareCaseInsensitiveAscending, CompareCaseInsensitiveDescending, CompareDescending
 
Constructor Summary
ERXSortOrdering(ERXKey key, com.webobjects.foundation.NSSelector selector)
          Constructs an ERXSortOrdering (see EOSortOrdering).
ERXSortOrdering(java.lang.String key, com.webobjects.foundation.NSSelector selector)
          Constructs an ERXSortOrdering (see EOSortOrdering).
 
Method Summary
 ERXSortOrdering.ERXSortOrderings array()
          Returns this sort ordering as an array.
 boolean equals(java.lang.Object obj)
          Provide the equals() method missing from EOSortOrder.
<T> void
sort(com.webobjects.foundation.NSMutableArray<T> array)
          Sorts the given array with this sort ordering.
<T> com.webobjects.foundation.NSArray<T>
sorted(com.webobjects.foundation.NSArray<T> array)
          Returns an array sorted with this sort ordering.
static ERXSortOrdering sortOrderingWithKey(ERXKey key, com.webobjects.foundation.NSSelector selector)
          Constructs an ERXSortOrdering (see EOSortOrdering).
static ERXSortOrdering sortOrderingWithKey(java.lang.String key, com.webobjects.foundation.NSSelector selector)
          Constructs an ERXSortOrdering (see EOSortOrdering).
 ERXSortOrdering.ERXSortOrderings then(com.webobjects.eocontrol.EOSortOrdering nextSortOrdering)
          Returns ERXSortOrderings with this sort ordering followed by the provided next sort ordering.
 
Methods inherited from class com.webobjects.eocontrol.EOSortOrdering
_operatorSelectorForString, classForCoder, decodeObject, decodeWithKeyValueUnarchiver, encodeWithCoder, encodeWithKeyValueArchiver, key, selector, sortArrayUsingKeyOrderArray, sortedArrayUsingKeyOrderArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERXSortOrdering

public ERXSortOrdering(java.lang.String key,
                       com.webobjects.foundation.NSSelector selector)
Constructs an ERXSortOrdering (see EOSortOrdering).

Parameters:
key - the key to sort on
selector - the sort selector

ERXSortOrdering

public ERXSortOrdering(ERXKey key,
                       com.webobjects.foundation.NSSelector selector)
Constructs an ERXSortOrdering (see EOSortOrdering).

Parameters:
key - the key to sort on
selector - the sort selector
Method Detail

then

public ERXSortOrdering.ERXSortOrderings then(com.webobjects.eocontrol.EOSortOrdering nextSortOrdering)
Returns ERXSortOrderings with this sort ordering followed by the provided next sort ordering.

Parameters:
nextSortOrdering - the next sort ordering to chain to this
Returns:
an array of sort orderings

array

public ERXSortOrdering.ERXSortOrderings array()
Returns this sort ordering as an array.

Returns:
this sort ordering as an array

sorted

public <T> com.webobjects.foundation.NSArray<T> sorted(com.webobjects.foundation.NSArray<T> array)
Returns an array sorted with this sort ordering.

Type Parameters:
T - the type of the array
Parameters:
array - the array to sort
Returns:
a sorted copy of the array

sort

public <T> void sort(com.webobjects.foundation.NSMutableArray<T> array)
Sorts the given array with this sort ordering.

Type Parameters:
T - the type of the array
Parameters:
array - the array to sort

equals

public boolean equals(java.lang.Object obj)
Provide the equals() method missing from EOSortOrder.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare to
Returns:
true if obj is an EOSortOrder with the same key and selector as this object

sortOrderingWithKey

public static ERXSortOrdering sortOrderingWithKey(java.lang.String key,
                                                  com.webobjects.foundation.NSSelector selector)
Constructs an ERXSortOrdering (see EOSortOrdering).

Parameters:
key - the key to sort on
selector - the sort selector
Returns:
a new ERXSortOrdering

sortOrderingWithKey

public static ERXSortOrdering sortOrderingWithKey(ERXKey key,
                                                  com.webobjects.foundation.NSSelector selector)
Constructs an ERXSortOrdering (see EOSortOrdering).

Parameters:
key - the key to sort on
selector - the sort selector
Returns:
a new ERXSortOrdering

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.