-->
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: Generate POJO's with Hbn2Java
PostPosted: Thu Oct 27, 2005 6:19 am 
Newbie

Joined: Thu Oct 27, 2005 6:11 am
Posts: 1
I have to generate some POJO's.
The mapping-files are in the directory C:/xy and my POJO's should be generated to C:/ab.
I have written an Ant-file that writes all mapping-files to a fileset. Then it starts Hbn2Java with this fileset.
My problem is that only modified/new mapping-files should be generated, not all of them. It is possible to compare the timestamp of the "old" POJO's with the new mapping-files??


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 3:28 am 
Regular
Regular

Joined: Thu Oct 27, 2005 8:06 am
Posts: 55
Location: München, Germany
Solving this in a fully automated way sounds complicated to me. It would mean to extract the file creation dates of the previously generated pojo files and entering them into the new generation process.

A pragmatic way might be to introduce an intermediate directory for hbm files, say c:/intermediate. Then write an ant task that copies selected hbm files from ab to intermediate, using a

Code:
<input
   message="Please enter date and time of last pojo generation"
   addproperty last.gen
/>

<fileset ...>
   <date datetime="last.gen" when="after"/>
</fileset>


Warning: This is just a sketch of a solution, not tested code.

Then run your hbn2java from intermediate.

Oh, and intermediate will have to be cleared before populating it, of course.


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.