Book a Demo

Author Topic: MDA help  (Read 2863 times)

c0deli0n

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
MDA help
« on: July 19, 2013, 11:53:38 pm »
Hi,

I'm new to the EA tool, but seem to have taken up an ambitious project. I'm trying to develop a JPA transformation template. For this, I'm leveraging the standard Java transforms as a starting point, and essentially trying to generate the annotations using Tagged Values on entities and attributes.

I am able to add the @Entity and @Embeddable attributes to classes based on whether my PIM class diagram has a "Class" type vs. "Datatype". I'm stuck at a point where I need to add an annotation for the attribute for a class that uses an embeddable object. E.g.

PIM: Person class has an attribute homeAddress of Datatype "Address"
should get transformed to
Java (JPA): Person @Entity with attribute homeAddress which should have type @Embedded

In order to do this, I need to detect if the Type of the homeAddress attribute in my PIM was modeled using a Datatype element. Is there a function / macro that allows me to get the information about other elements in the source transform package?
« Last Edit: July 19, 2013, 11:55:53 pm by mehtanirav »