Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPA equivalents to Hibernate Restrictions, Expression, Examples

843830Dec 21 2006 — edited Mar 26 2007
In Hibernate you can use the Session object to create Criteria objects which then can have Restriction, Expression, or Example objects applied as filters to the Criteria query. Is there anything like that in the JPA standard?

What would be a JPA equivalent to...
Criteria crit = mySession.createCriteria();
Example examplePerson = Example.create(myPerson);
personExample = personExample.ignoreCase().excludeProperty("lastName");
crit = crit.add(personExample);
List resultsLikeMyPerson = crit.list();
Any help is greatly appreciated. We are moving from using Hibernate-specific features to using a pure JPA solution. Getting rid of a few uses of Example, Restrictrion, etc will take care of the worst part of our conversion.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2007
Added on Dec 21 2006
1 comment
379 views