AndroMDA hbm CartridgeDocument content: this is a simple, experimental cartridge for Andromda to directly generate hbm mappings for hibernate 2. It is far from complete but I find it quite usefull. Warning: experimental Links: - full document - contact me: Marilen Corciovei - Hibernate(the DB persistence) - AndroMDA - Nemesis IT (my company) Download: download the cartridge Model tagging
- PrimaryKey: stereotype for an attribute tagging it a the primary key
- SQLType: taggedValue for an attribute generating an optional hibernate sql-type = ...
- NotNull: taggedValue marking an attribute as not null
- seq: optional per table sequence name. Results in a:
<generator class="${generator}">
<param name="sequence">$seq</param>
</generator>
- build.xml user properties*
- generator: sequence generator type
- tableprefix: table prefix for generated tables
<target name="hbm" depends="init">
<taskdef name="andromda"
classname="org.andromda.core.anttasks.AndroMDAGenTask"
classpathref="build.class.path"
/>
<unzip src="uml/service.zargo" dest="build/model/unzipped" />
<andromda basedir="build/model/unzipped"
includes="service.xmi"
lastModifiedCheck="false"
typeMappings="${umlgen.dir}/TypeMapping.xml"
>
<userProperty name="generator" value="native" />
<userProperty name="tableprefix" value="NITSERVICE" />
<outlet cartridge="hbm" outlet="entities" dir="${src.dir}" />
</andromda>
</target>
|