<!--
=======================================================-->
<!-- XDoclet Plugin -->
<!--
=======================================================-->
<!--
This plugin will ...
-->
<!--
=======================================================-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<hibernatedoclet
destdir="${basedir}/src/main/resources"
mergedir="${basedir}/src/main/resources"
excludedtags="@version,@author,@todo,@see,@desc"
verbose="true">
<fileset
dir="${basedir}/src/main/java">
<include name="**/*.java"/>
</fileset>
<hibernate version="3.0"/>
</hibernatedoclet>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
Then the JavaBean:
package org.delta.provider.npi.data;
import org.delta.provider.npi.BaseObject;
/**
* Simple JavaBean domain object representing the static plans.
*
* @author Martin Eggenberger
* Documentation Started on 18/01/07 Manindar
*
* @hibernate.class table = "PLAN" polymorphism="explicit"
* @hibernate.cache usage = "read-write" lazy="false"
*
*/
public class Plan extends BaseObject {
/**
* planCode.
*/
private String planCode;
/**
* Description of plan.
*/
private String planDescription;
/**
* Getter method for planCode.
*
* @return String - Plan code
*
* @hibernate.id column="PLANCODE"
* generator-class="assigned"
*
* @hibernate.property column="PLANCODE"
*/
public final String getPlanCode() {
return planCode;
}
/**
* Setter method for planCode.
*
* @param planCode - String Plan code to set.
*/
public final void setPlanCode(final String planCode) {
this.planCode = planCode;
}
/**
* Getter method for PlanDescription.
*
* @return String - Plan code Description
*
* @hibernate.property column="PLANDESCRIPTION"
*/
public final String getPlanDescription() {
return planDescription;
}
/**
* Setter method for PlanDescription.
*
* @param planDescription - String planDescription to set.
*/
public final void setPlanDescription(final String planDescription) {
this.planDescription = planDescription;
}
}
Go to the xdoclet site to see more detailed description of the annotation
tags...
On 1/24/07, Roberto UserList <[EMAIL PROTECTED]> wrote:
Hi all, I want to generate Hibernate mapping files from xdoclet annotated
JavaBeans. Which pluging I could use to do this and where I find some
documentation.
Thanks in advance for help.
Regards,
Roberto.
--
Thanks
DJ MICK
(Mick Knutson)
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com