Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » sortedBy
sortedBy [message #1277401] Wed, 26 March 2014 00:02 Go to next message
Arseniy Isakov is currently offline Arseniy Isakov
Messages: 33
Registered: May 2012
Member
Hello

I am using in my query sortBy operation but as a result I am getting exception.
Can you please provide some example for sortBy operation

domain::Operation.allInstances()->select(r|r.oclAsType(domain::Operation).uid ='423894789').oclAsType(domain::Operation).parameters->sortBy(r|r.oclAsType(domain::Parameter).order)


Thanks
Arserniy Isakov
Re: sortedBy [message #1277638 is a reply to message #1277401] Wed, 26 March 2014 09:09 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi Arseniy,

Sure. sortBy returns a copy of the collection on which it is invoked, sorted by the result of the provided expression. For example, the following expression would return a name-sorted collection of all EClasses in an Ecore model: EClass.all.sortBy(c | c.name). I hope this helps.

Cheers,
Dimitris
Previous Topic:[EVL] Access to parent node
Next Topic:[URGENT] Creating XML Model using EOL
Goto Forum:
  


Current Time: Thu Sep 18 11:44:35 GMT 2014

Powered by FUDForum. Page generated in 0.01782 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software