[EMF Query] eoperations [message #419348] |
Tue, 20 May 2008 04:51 |
Jim Steel Messages: 54 Registered: July 2009 |
Member |
|
|
Hi,
Apologies in advance if this is a naive question and I should have found
the answer somewhere else.
I'm building queries out of EObjectConditions and I want to be able to
invoke an EOperation as part of the query, i.e.
SELECT
WHERE x.foo("bar") == true
The EOperation I want to call is idempotent, so it shouldn't be
dangerous. There seem to be nice classes for checking the values given
by attributes and references, but none for checking the values returned
by an EOperation. I can always just create a custom EObjectCondition
(this is what I have done), but it occurs to me there might well be, or
perhaps should be, a "nicer" way of doing it, a la
EObjectOperationValueCondition or something.
Am I missing something? If not, is such a thing planned?
Cheers,
Jim.
|
|
|
Re: [EMF Query] eoperations [message #419371 is a reply to message #419348] |
Wed, 21 May 2008 03:03 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Hi, Jim,
No, you are not missing anything. There isn't any condition that
looks at operation values.
In general, the API would have to assume that an EOperation can change
the model, so it doesn't seem like a safe kind of condition to
provide. Ecore doesn't have UML's "isQuery" attribute to tell us that
an operation is guaranteed not to have side-effects.
Cheers,
Christian
On Tuesday 05-20-2008 (12:51), Jim Steel wrote:
> Hi,
> Apologies in advance if this is a naive question and I should have
> found the answer somewhere else.
> I'm building queries out of EObjectConditions and I want to be able
> to invoke an EOperation as part of the query, i.e.
> SELECT
> WHERE x.foo("bar") == true
> The EOperation I want to call is idempotent, so it shouldn't be
> dangerous. There seem to be nice classes for checking the values
> given by attributes and references, but none for checking the values
> returned by an EOperation. I can always just create a custom
> EObjectCondition (this is what I have done), but it occurs to me
> there might well be, or perhaps should be, a "nicer" way of doing it,
> a la EObjectOperationValueCondition or something.
> Am I missing something? If not, is such a thing planned?
> Cheers,
> Jim.
--
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
|
|
|
Powered by
FUDForum. Page generated in 0.02504 seconds