PATH Documentation > WebObjects

Table of Contents

EOSortOrdering.ComparisonSupport


Inherits from:
Object
Package:
com.webobjects.eocontrol


Class Description


The Java Client EOSortOrdering.ComparisonSupport class provides default implementations of the EOSortOrderingComparison interface.

The Java Client EOCustomObject uses EOSortOrdering.ComparisonSupport's default implementations. Typically your custom enterprise object classes inherit from EOCustomObject and inherit the default implementations. If your custom enterprise object class doesn't inherit from EOCustomObject, you should implement the EOSortOrderingComparison interface directly.




Method Types


Setting up automatic support
setSupportForClass
supportForClass
Comparing two objects
compareValues
EOSortOrderingComparison methods
compareAscending
compareCaseInsensitiveAscending
compareCaseInsensitiveDescending
compareDescending


Static Methods



compareValues

public static int compareValues( Object anObject, Object anotherObject, NSSelector selector)

Compares the two objects using selector. You should use this method to compare value objects instead of calling selector directly. This method is the entry point for the comparison support, and calls methods in support classes if appropriate.

setSupportForClass

public static void setSupportForClass( EOSortOrdering.ComparisonSupport supportClass, Class aClass)

Sets supportClass as the support class to be used for comparing instances of aClass. When compareValues is called, the methods in supportClass will be used to do the comparison for instances of aClass.

supportForClass

public static EOSortOrdering.ComparisonSupport supportForClass(Class aClass)

Returns the support class used for doing sort ordering comparisons for instances of aClass.


Instance Methods



compareAscending

public int compareAscending( Object receiver, Object anObject)

Returns NSComparator.OrderedAscending if anObject is naturally ordered after receiver, NSComparator.OrderedDescending if it's naturally ordered before receiver, and NSComparator.OrderedSame if they're equivalent for ordering purposes.

compareCaseInsensitiveAscending

public int compareCaseInsensitiveAscending( Object receiver, Object anObject)

Returns NSComparator.OrderedAscending if anObject is naturally ordered-ignoring case-after receiver, NSComparator.OrderedDescending if it's naturally ordered before receiver, and NSComparator.OrderedSame if they're equivalent for ordering purposes.

compareCaseInsensitiveDescending

public int compareCaseInsensitiveDescending( Object receiver, Object anObject)

Returns NSComparator.OrderedAscending if anObject is naturally ordered-ignoring case-before receiver, NSComparator.OrderedDescending if it's naturally ordered after receiver, and NSComparator.OrderedSame if they're equivalent for ordering purposes.

compareDescending

public int compareDescending( Object anObject, Object anObject)

Returns NSComparator.OrderedAscending if anObject is naturally ordered before receiver, NSComparator.OrderedDescending if it's naturally ordered after receiver, and NSComparator.OrderedSame if they're equivalent for ordering purposes.

© 2001 Apple Computer, Inc. (Last Published April 19, 2001)


Table of Contents