-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate and the JPA 2.0 Criteria API
PostPosted: Wed Jun 17, 2009 11:33 am 
Newbie

Joined: Wed Apr 30, 2008 1:49 pm
Posts: 7
Hi,

JPA 2.0 will contain a Criteria API. Will hibernate implement this API ?

We are interested in this as it would allow applications to be developed without exposing a specific Persistence Layer implementation. We have a requirement that the persistence layer implementation may be changed throughout the lifetime of our project. Utilizing the JPA Criteria API would allow us to hide the hibernate implementation

DAOs do not expose the persistence layer implementation through their CRUD methods but using the hibernate Criteria API in business logic exposes hibernate (org.hibernate.Criteria etc) to the application, which we find undesirable.

Alternatively, is there another way of using the hibernate criteria API without exposing the hibernate interfaces ?

Many thanks,
Ben Dave


Top
 Profile  
 
 Post subject: Re: Hibernate and the JPA 2.0 Criteria API
PostPosted: Mon Sep 07, 2009 1:00 pm 
Beginner
Beginner

Joined: Sun Jun 13, 2004 9:49 pm
Posts: 38
We'd like to do this as well. Also, will hibernate support creating a QueryBuilder instance on a client with no access to EntityManagerFactory.getQueryBuilder() or EntityManager.getQueryBuilder()?

When will this all be in Hibernate?


Top
 Profile  
 
 Post subject: Re: Hibernate and the JPA 2.0 Criteria API
PostPosted: Mon Sep 07, 2009 8:42 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Hibernate 3.5 will support JPA2.0. I believe an early release is already available. It is still missing some features, but hey, it's an early release.

Check it out!

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Re: Hibernate and the JPA 2.0 Criteria API
PostPosted: Sun Jan 17, 2010 11:05 am 
Beginner
Beginner

Joined: Sun Jun 13, 2004 9:49 pm
Posts: 38
We are currently using and migrating our persistence framework over to Hibernate 3.5 betas. But what we'd like to know is, can we create a criteria query (filter) on a disconnected client (e.g. Netbeans/Eclipse RCP apps etc).

We would like to have a query builder on the client and then submit them to the server. Also, we'd like to persist these quieries, but that's another issue :)

I did read a blog from someone close to the JSR that we would be able to create disconnected criteria queries. Is this true? If so how do we do it. If not we'll stick with the current (excellent) hibernate criteria building.


Top
 Profile  
 
 Post subject: Re: Hibernate and the JPA 2.0 Criteria API
PostPosted: Mon Jan 18, 2010 4:31 pm 
Beginner
Beginner

Joined: Sun Jun 13, 2004 9:49 pm
Posts: 38
Anyone know how to do this?


Top
 Profile  
 
 Post subject: Re: Hibernate and the JPA 2.0 Criteria API
PostPosted: Tue Jul 13, 2010 9:26 am 
Beginner
Beginner

Joined: Sun Jun 13, 2004 9:49 pm
Posts: 38
So can this be done yet?


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