Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Dieter 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
-
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.
-
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.