DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-819
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

Provide helper method to order a List based on some order clause

Created: 14/Mar/12 10:23 AM   Updated: 30/Mar/12 09:25 AM   Resolved: 14/Mar/12 10:31 AM
Component/s: Persistence, Queries
Affects Version/s: None
Fix Version/s: 3.0.10, 3.1.0.m2

 Description  « Hide
With "ordered Lists" the user provides an order clause based on fields in the element. With many datastores we are now storing the ids of the elements in the owner object, but this is in "indexed" order (i.e the order they were added to the List). What we really need is a convenience method that will take the order clause and the indexed List of elements and reorder them. This can make use of the in-memory query evaluator code

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 14/Mar/12 10:31 AM
SVN trunk and branches/3.0 have a helper method as QueryUtils.orderCandidates