Book a Demo

Author Topic: Plug-In XDoclets  (Read 5760 times)

jbirk

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Plug-In XDoclets
« on: June 17, 2004, 07:57:49 am »
Hi,

  I would like to know what plug-in I have to use in the Enterprise Architect, to generate, using XDoclets, the files .hbm.xml for use in the Hibernate...

Tks,
João Birk
« Last Edit: June 17, 2004, 07:58:53 am by jbirk »

martin.grotzke

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Plug-In XDoclets
« Reply #1 on: June 19, 2004, 07:59:42 am »
hello  joão,

i started working on such a profile some days ago.
this profile shall provide stereotypes for tags listed on http://xdoclet.sourceforge.net/xdoclet/tags/hibernate-tags.html, so that an xdoclet.tag becomes a stereotype, and xdoclet.tag.parameters are realized as tagged values for the stereotype.
stereotypes and tagged values shall be used for code generation (java), so that the corresponding xdoclet tags with params get generated.

i'm doing this only for a case study, so i won't realize all tags, only those which i really need for generation (which are probably also the most commonly used).

if this is what you're looking for, let me know, perhaps we could share some work...

regards,
martin

martin.grotzke

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Plug-In XDoclets
« Reply #2 on: June 21, 2004, 12:55:37 am »
d'oh, i just realized that one might need more than only one xdoclet-tag for one method or class.
but with the mapping of stereotype -> xdoclet-tag, that would require enterprise architect to
be able to assign more than one stereotype to an element - which is currently not possible.

as solution, for an xdoclet-tag, one could define a tagged value with the xdoclet-tag name and the
value "true", to mark that this xdoclet-tag shall be applied to the class.
the xdoclet-parameters for the given xdoclet-tag, then could be defined as
tagged values with the format <tag-name>.<parameter-name>.

e.g., the xdoclet-tag "@hibernate.class" with the paramater "table" would result
in two tagged values:
hibernate.class=true
hibernate.class.table=NameOfDbTable

this would provide all required information for code generation.
not really nice, but i currently see no other practical solution...

regards,
martin