I am currently using hibernate tools and reveng.xml with custom templates to generate my POJO code.
Sadly, I get the same problems as this guy here, who would (like me) like to have typed generics:
http://www.myeclipseide.com/PNphpBB2-vi ... 23016.htmlInstead of generating: Set mySet = new HashSet(0);
I would like to have: Set<MyType> mySet = new HashSet<MyType>(0);
Only difference to him is my setup:
I use multiple generic exporters together with muliple hibernate.*.reveng.xml and various custom templates to generate:
- DAOs (<myClass>DAO.java)
- POJOs (abstract and non-abstract) each residing in different packages
- Hibernate Mapping Files (*.hbm.xml)
As far as I know, I then cannot use JPA in my current setup, as the classes are generated using a generic exporter and templates.
So next, I thought about tampering my templates, so annotations are generated and after that trigger the standard hbm2java exporter, who would then read the annotations and generate the final code. Is this approach silly or is there a better way to get the above typed generics in my generated Java code?
Thanx in advance!