Book a Demo

Author Topic: Generating EJB(3.0)-annotations from the PIM  (Read 2884 times)

Dieter

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Generating EJB(3.0)-annotations from the PIM
« on: February 08, 2010, 08:49:04 pm »
I'm using EA 7.5 Corporate Edition

What I have: a logical Model (PIM)
What I've done: a generated PSM for Oracle database (it is working)
What I want: generate java-code from the PIM with all required EJB annotations (but I don't know how)

Example:
The PIM defines an object (interface) with an attribute:
  name: customerName
  type: String
  length: 25 (defined by tagged value)
  nullable: false (defined by tagged value)


getter-method: getCustomerName

The generated Java-code with annotations should look like this:
  
   @column(name="CUSTOMERNAME", nullable=false, length=25)
   public String getCustomerName(){
         return ....;
   }
  
My idea is to get the information for the annotation tag by defining tagged values on attribute level and to assign them in a next step to the getter methods (by modifying operation template).
But how can I transfer these informations from the attibutes to the operations ... or how can I access attribute tagged values in the operation template?

Any ideas or alternative approaches?

Dieter

Andrew Warner

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Generating EJB(3.0)-annotations from the PIM
« Reply #1 on: February 15, 2010, 12:56:01 pm »
Hi Dieter,
have you had any feedback on this? I'm interested because the ability to add Attributes and Operations as tagged values using a RefGUID type is promising but I can't seem to get access to the enclosing context.

I would like to add a tagged value pointing to an attribute then report on that attribute in an RTF report, displaying the attribute and its context. Without the context it is useless to show the name of the attribute.

I hope this is close to your original post.

Cheers,
Andrew.
« Last Edit: February 15, 2010, 01:00:08 pm by adwarner »
Regards,
Andrew Warner.

Dieter

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Generating EJB(3.0)-annotations from the PIM
« Reply #2 on: February 15, 2010, 11:58:15 pm »
Hi Andrew, I've got no feedback up to date, but I've sent a request to the customer support last week.
I will inform you when I have more info.