File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ordering collection returned from a CMR Method

 
Tribhuvan Agarwal
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a CMR relationship with a 1 to many.
From that CMR method i get a collection.
That collection is not ordered. I need to get a ordered collection that is returned from that CMR Method. How to do this??
Is there any way to make that CMR method return sorted collection.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJBQL in EJB 2.0 does not provide a support for this. EJB 2.1 does support ORDER BY clause. You can either use the proprietary Sort provided by the conatainer(this makes it difficult to port) or sort the collection.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic