These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Velocity based renderer for hbm2java now available
PostPosted: Tue Dec 02, 2003 6:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
A firstshot at subject is now in CVS of HibernateExt.
I've promised it for a looong time, so now it's time to
fullfill that promise (unfortunately I'm currently disappointed
about how hard it turned out to make a .vm behave just
as intelligent as the current renderer - thus the .vm file
are not at all complate)

But please try it out and report back with any problems ;)

The changes are:

* hbm2java now have an Velocity based renderer
* Renderer's can now be configured with <param> tags
* Refactored the "source model" hbm2java uses.
+ now all elements have access to their corresponding XML data. Can be used to access all the information that are not otherwise directly available.

The docs for velocity renderes are:

Velocity based renderer/generator

It is now possible to use velocity as an alternative rendering mechanism.
The follwing config.xml shows how to configure hbm2java to use its velocity renderer.

Code:
      
   <codegen>
     <generate renderer="net.sf.hibernate.tool.hbm2java.VelocityRenderer">
      <param name="template">pojo.vm</param>
     </generate>
    </codegen>


The parameter named template is a resource path to the velocity macro file you want to use.
This file must be available via the classpath for hbm2java. Thus remember to add the directory where pojo.vm
is located to your ant task or shell script. (The default location is ./tools/src/velocity</literal>


Be aware that the current pojo.vm generates only the most basic parts of the java beans.
It is not as complete and feature rich as the default renderer - primarily a lot of the meta tags
are not supported.

Any improvements, comments, questions and contributions for improving the velocity based renderer.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2003 10:20 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
cool :)

good shit, Max


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.