Re: Ordering.orderList generates "set operation not supported" on query with pageSize

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jan 14 2004 - 22:43:16 EST

  • Next message: Mike Kienenberger: "Re: Ordering.orderList generates "set operation not supported" on query with pageSize"

    On Jan 14, 2004, at 12:59 PM, Mike Kienenberger wrote:

    > Ordering.orderList generates a "set operation not supported" exception
    > when
    > executed on a query with a specific pageSize.
    >
    > I understand how this bug could come about, and I'm guessing that I
    > need to
    > manually forcing each fault to resolve before calling orderList.

    well, even if IncrementalFaultList is fully resolved, iterator returned
    is still going to be of the same class as for unresolved list. So it
    will throw the same exception on modification. The only solution now is
    to sort a clone of the original list, e.g.:

    // clone list - this will result in faulting of unresolved objects
    among other things
    reportRowsList = new ArrayList(reportRowsList);

    // sort the clone
    Ordering.orderList(reportRowsList, currentSortOrder);

    > However, I suspect this should be handled by the framework rather than
    > the
    > user.

    Yeah, I guess we may implement iterator modification methods that would
    resolve list prior to calling "set", "remove", etc. I don't see a
    problem with that.

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Jan 14 2004 - 22:43:20 EST