You could try to put in the Xdoclet tags in your POJO's. IE:
@hibernate.class table="someTable"
@hibernate.property column="columnName"
public String getColumnName() {
return columnName;
}
I am a bit new to Hibernate, and not convinced that Xdoclet is the way to go, but at this point I think it is simpler than writing the HBM files. However, I think that you are going to ultimately get more control through using the Toolset however mastering the toolset is an artform in and of itself. If you are not needing complex control, this will get you started quickly, and is simple to implement.
Here is the XDoclet reference:
http://xdoclet.sourceforge.net/xdoclet/ ... -tags.html
In your buildfile, you will want to have something along the lines of
<target name="generate-hbm" description="Generate Hibernate hbm.xml file">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
classpathref="xdoclet.lib.path" />
<mkdir dir="${build.dir}" />
<mkdir dir="${gen.source.dir}" />
<hibernatedoclet destdir="${gen.source.dir}">
<fileset dir="${source.dir}">
<include name="**/*DTO.java" />
<include name="**/*DO.java" />
</fileset>
<hibernate version="3.0" />
</hibernatedoclet>
</target>
Good Luck.