IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Ordering Recordlist

    Posted Wed October 15, 2003 10:04 AM

    Hi All,
    I have an RecordList containing 10 columns and records in that list is in any order.
    Now i want to order the RecordList on 3rd and 5th Column in the record.

    Can anyone suggest me how to do the same ??


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Ordering Recordlist

    Posted Wed October 15, 2003 11:08 AM

    Hi Atul,

    Refer to Java API supplied by webMethods, in this there is a method public static IData sortIDataArrayByKey(IData dataArray,
    java.lang.String key,
    int compareType,
    java.lang.String pattern,
    boolean reverse)

    in IDataUtil class through which you can sort.

    Kalyan


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Ordering Recordlist

    Posted Wed October 15, 2003 05:18 PM

    I think the IDataUtil.sortIDataArrayByKey method only uses a single key to sort by. To sort on multiple keys you will need to concatenate one or more “columns” of your recordlist together and then sort on that composite key.

    It would be nice if the IData object implemented the Comparable interface. I’m not sure how difficult it would be to simulate this.

    Mark


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services