Regla que cree y retorne coleccion de objetos [message #866073] |
Mon, 30 April 2012 18:21 |
Flower Missing name Messages: 8 Registered: October 2011 |
Junior Member |
|
|
Hi, I need to make a transformation in which each element of a collection, I return another collection of objects transformed to assign the output. Eh not found an optimal way on any side.
Sampling of the transformation so that they understand exactly what I need most:
lazy rule {createDAO_impl
from
e: UML2! Class
to
dimpl: JAVA! JavaClass (
name <- e.name + '_DaoImpl'
Implemented <- idao
)
idao: JAVA! Interface (
name <- 'I' + e.name + '_DAO'
IsAbstract <- true,
methods <- e.getUsages () -> collect (a | thisModule.getMethodsDAO (a))
)
In methods <- need to assign a collection of objects created by methods of each object to the collection "e.getUsages ()" .. Usually creates a single object, I am needing to define more than one .. So, I need the function "thisModule.getMethodsDAO (a)" I return a collection of methos created, as it should be that function? ..
If anyone can help me I thank you tremendously!
Greetings, Florence.
|
|
|
Powered by
FUDForum. Page generated in 0.02867 seconds