Skip to main content



      Home
Home » Eclipse Projects » Sirius » How to get all of the instances of a class using AQL queries
How to get all of the instances of a class using AQL queries [message #1823940] Sat, 04 April 2020 05:47 Go to next message
Eclipse UserFriend
Hello all,

I have a situation in my metamodel just like the figure below. Now I created a graphical editor using sirius for it but I had two questions when the elements generated by the user using pallette.

metamodel:
index.php/fa/37747/0/

viewpoint file:
index.php/fa/37748/0/

1. I want when the user tries to create classA element the creation will check using an AQL query and if the element generated before the element doesn't create again. Now the problem is how could I get all of the classA instances in AQL ?????

2. In advance, how could I check the att1 attribute type in each instance and for example if the att1 is T1 the element does not create?????? how could I reach to this attribute type in instances?????

I will appreciate if anyone could help :-)

Maryam
Re: How to get all of the instances of a class using AQL queries [message #1824020 is a reply to message #1823940] Mon, 06 April 2020 11:02 Go to previous messageGo to next message
Eclipse UserFriend
any help????
Re: How to get all of the instances of a class using AQL queries [message #1824139 is a reply to message #1823940] Wed, 08 April 2020 09:17 Go to previous message
Eclipse UserFriend
Hi,

to find all the instances of a class in the same model/resource, you can use an expression like this:

aql:self.eResource().eAllContents(my::Type)


See the AQL reference documentation for more details: https://www.eclipse.org/acceleo/documentation/aql.html

Previous Topic:Can't use aql due to java.lang.IllegalStateException
Next Topic:Readonly attribute
Goto Forum:
  


Current Time: Fri Jun 13 13:36:23 EDT 2025

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

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

Back to the top