commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18792] New: - BeanComparator with multiple sort fields
Date Tue, 08 Apr 2003 03:08:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18792>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18792

BeanComparator with multiple sort fields

           Summary: BeanComparator with multiple sort fields
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: tobrien@discursive.com


Assume you've got a City bean with 3 string properties -
 "country", "name", "population".  You've got a collection of City objects, and 
you wish to sort them primarily by country and secondly by name.  

The BeanComparator should take an array of property names, and if the primary 
comparison returns a 0, it should fall back to the next property - repeating as 
necessary until the property array is exhausted.

The existing getProperty/setProperty should be retained to preserve backwards 
compatibility.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message