-->
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.  [ 133 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next
Author Message
 Post subject:
PostPosted: Sun Aug 14, 2005 1:50 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Christian, are you referring to this?

http://forum.hibernate.org/viewtopic.ph ... neric+daos

There's just one post about generated DAOs. Tomorrow night I will have something presentable for this. It would be real NICE if this something could actually pull object graphes through DAOs that were generated via the tools suite - or real ugly w/ a bunch of generated calls to a Session. I don't see a generator task for DAOs under org.hibernate.tool.ant, although there are velocity templates and a DAOExporter under org.hibernate.tool.hbm2x .

I have the rest of the weekend to work on hbm2jsf but after that I work 4 10s. Any quick info for my day tomorrow would be appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 1:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
DAOExporter works - just no ant task yet. trivial to add - just look at e.g. hbm2javageneratortask if you want something right now ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 2:08 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I was referring to the DAO's I've added to CaveatEmptor. If we generate for JDK 5.0, this is probably a very good DAO design:

http://cvs.sourceforge.net/viewcvs.py/h ... ction/dao/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 2:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
ahh - you did commit it (didn't realize that). Did you solve the ejb3 issue you raised at some point ?

It does look very nice and clean. Only downside is the jdk 1.5 dependency and not any real good way to provide a 1.4 compliant layer - but I guess there is no harm in providing this as a supreme-dao exporter ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 14, 2005 7:20 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Well, I'm not sure EJB3 session beans can be inner classes. Otherwise you would have to create "empty" first-level classes for CRUD-only DAOs just to satisfy the empty business DAO interface and to put the @Stateless on.

Except for that it's final now, I guess. Got to think about a second type variable for the identifiers.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 2:26 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Below is a URL to a patch representing hbm2jsf in it’s infancy. For the curious, you will need a JSF implementation – I recommend MyFaces 1.0.9 . There is also a URL to a build file that will come in handy.

The generated web application does not make use of the DAOs because I lost a fist fight w/ JBoss/JTA/HAR. It also chokes on non-Integer identifier properties, but it will generate a batch of session scoped biz beans for you to play with. There is also a small fix in the patch for the DAO VTL – the one in HEAD creates a logger w/ ClassName.class when it should use ClassNameHome.class. There is also a hook in the HibernateToolTask and an Hbm2DOAGeneratorTask so that it can be used from an ant script.

From a high level point of view, the following is generated for each class: a Lister, a Lister.jsp, a BackendCrudBean, a BackendCrudBean.jsp, and a Converter. Session scoped Lister beans serve collections (they are currently pretending to be the OR framework as well). Request scoped BackendCrudBeans manage the server side object model and will soon delegate work to DAOs. Converters provide a request-paramater-2-object layer.

http://hbm2jsf.dbyrne.net/build.xml

http://hbm2jsf.dbyrne.net/aug14.txt


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 2:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
please put it in jira - thank you

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 4:34 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Attention anyone who reads this. I want your datamodels for testing .

If you have a postgres7-8 schema and/or data dump that does not contain sensitive information, send it to dennis@dbyrne.net . Nothing > a few MBs please.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 4:32 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
hi dennisbyrne,
i have unit tests for a very small demo app. It uses 6 classes (it has inheritance, map, one-to-many and many-to-one associations).
I also have a servlet filter init method that creat the schema and inject some test instances.
Tell me if it is too light or not. I can send you this, you'll just have to change the dialect.

anthony@hibernate.org

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 4:55 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Thanks anthony. Please email me the source and I will take a look this weekend. The generator may die on the inheritance, so it will be a good use case.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 11:36 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
humm, what is your email? ;-)

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 1:01 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
It's in the post above, starting w/ "I want your datamodels for testing" ; ) Looking forward ...

dennis@dbyrne.net


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 4:51 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
done yesterday by night, did you receive it?

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 1:03 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Yes - you play soccer? I emailed you a few questions, let me know if you did not recieve it. Your model has shown me several shortcomings in the generator's design so far.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 5:34 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
i play soccer on PS2 ;-)
i didn't receive your email ... maybe a problem with my mailbox

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 133 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next

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.