-->
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.  [ 3 posts ] 
Author Message
 Post subject: Neeed help in Custom code generation?
PostPosted: Wed Jun 03, 2009 3:36 pm 
Newbie

Joined: Wed Jun 03, 2009 3:29 pm
Posts: 1
Hi,
WE are generating code through hibernate tool ant task.We need to implemnt our own custom interface for each Entity i.e. "Persistent<Type of Primary key in Entity>".
e.g "OurEntity implements Persistent<Primary key Type>"

Tell us how to do this. Either bu modyfing ftl file or by java.

Its really urgent.......


Top
 Profile  
 
 Post subject: Re: Neeed help in Custom code generation?
PostPosted: Sat Jun 06, 2009 1:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well, you modify the ftl file (see docs on how to do this) to include implements Persistent<...>

To know what should be in ... look in the templates for how we print out the primary key type.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Neeed help in Custom code generation?
PostPosted: Sat Jun 06, 2009 1:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
btw to get the identifierProperty you can use <#assign propertyIdentifier = class.getIdentifierProperty()>

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.