| Author |
Message |
|
|
Post subject: DAO Template support
Posted: Feb 15, 2006 - 04:56 PM
|
|
Registered Member


Joined: Jun 13, 2004
Posts: 41
|
|
In C:\Program Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.hibernate_4.1.0\templates I see most of the templates that MyEclipse uses to generate the POJO's when Hibernate does its thing.
What I don't see is the template where the dao is generated. Also, does anyone have a list of variables that are exposed by Velocity for purposes of customizing the generated artifiacts?
Basically, I want to generate the comments necessary to keep my Checkstyle plug-in happy.
Thanks,
Chris |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 15, 2006 - 07:52 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
Chris I'll look intot his for you. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 15, 2006 - 08:01 PM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2339
|
|
|
_________________ Brian
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 20, 2006 - 04:58 PM
|
|
Registered Member


Joined: Jun 13, 2004
Posts: 41
|
|
Brian,
Thanks alot. I'll check it out.
Chris |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 25, 2006 - 02:31 PM
|
|
Registered Member


Joined: Jun 13, 2004
Posts: 41
|
|
Brian,
I notice that certain comments and methods should be generated if I'm using jdk5. However, even with the compiler set to 5.0, it's not generating the generic list support that I see in the DAO templates.
How do I configure this to generate the correct methods?
Thanks,
Chris |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 25, 2006 - 03:47 PM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2339
|
|
Chris,
We have explicitly turned Java 5 generation off since we don't officially support it yet.
If you want to try it, edit the template you want JDK 5 support for and at the top, add this line
Let us know how it turns out,
Best,
Brian. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 25, 2006 - 05:39 PM
|
|
Registered Member


Joined: Jun 13, 2004
Posts: 41
|
|
Brian,
When might this support be in place? I'm currently getting this error:
java.lang.IllegalStateException: expected jdk5 to be bound to false but was to true
at org.hibernate.tool.hbm2x.TemplateHelper.removeFromContext(TemplateHelper.java:230)
at org.hibernate.tool.hbm2x.AbstractExporter.cleanUpContext(AbstractExporter.java:201)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:91)
at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:58)
at com.genuitec.eclipse.hibernate.wizards.MEDAOExporter.start(MEDAOExporter.java:74)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:342)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:262)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Thanks,
Chris |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 28, 2006 - 05:43 AM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2339
|
|
Chris,
We will most likely include JDK5 support in a release post 4.1.1, which is a maintanence release.
I had no idea there would be a problem resetting the variable. The only suggestion I can make is to replace all instances of $jdk5 in your template to something else.. $cjdk perhaps and set that to true instead. Then you won't be messing with a preset variable, and Velocity won't have a problem.
Sorry for the inconvenience caused, but we still need to beef up JDK5 support until which point we don't intend to support it at a UI level.
Let me know if you have further issues,
Best,
Brian. |
_________________ Brian
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 28, 2006 - 01:44 PM
|
|
Registered Member


Joined: Jun 13, 2004
Posts: 41
|
|
Brian,
Thanks for the info. Do you have a timeframe for the 4.1.1 maintenance release?
Chris |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 28, 2006 - 02:15 PM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2339
|
|
Chris,
Sorry for my confusing sentence above. 4.1.1 is due sometime this week, but will not include JDK 5 support as it is a maintanence release.
We will look at supporting JDK 5 only after 4.1.1.
Best,
Brian. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 28, 2006 - 02:20 PM
|
|
Registered Member


Joined: Jun 13, 2004
Posts: 41
|
|
Brian,
Ah, missed the "post" 4.1.1 comment. I've manually added generics and comments so I'll test those.
Thanks,
Chris |
|
|
| |
|
|
|
 |
|
|