You could create a class the extends SortedSet or any other type of sorted
collection and implements ManageableCollection. Set its comparator to
something that would sort your pages by prioirty. Then specify the
collectionClassName in your annotations to this class.

On Tue, Dec 23, 2008 at 6:33 PM, majohnst <[email protected]> wrote:

>
> I have a List in my object that is being mapped by @Collection. I am able
> to
> add and edit the collection properly. My question is because I set this up
> as a java.util.List, is there any way to preserve the ordering of the nodes
> in the collection?
>
> Here is my field:
> @Collection(jcrElementName="page", elementClassName=Page.class,
> collectionConverter=NTCollectionConverterImpl.class)
> private List<Page> pages;
>
> I have a "priority" field on the Page object that I figure I could order by
> during queries, but I want the order to remain correct when I use
> getPages().
> --
> View this message in context:
> http://www.nabble.com/Preserve-order-of-OCM-%40Collection-tp21151759p21151759.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>


-- 
Todd Seiber
830 Fishing Creek Rd.
New Cumberland, PA 17070

h. 717-938-5778
c. 717-497-1742
e. [email protected]

Reply via email to