views:

299

answers:

3

JPA 1.0 specification is not defining the Criteria API which provides a programmatic approach for creating and modifying JPA Queries. Is there any API for building SQL and JPQL Queries like the way Hibernate Criteria Api is doing?

+2  A: 

I found what I wanted.

http://source.mysema.com/display/querydsl/Querydsl

Thanks

Cem
+1  A: 

Querydsl is an API for type-safe construction of HQL (extended JPAQL), JDOQL and SQL queries. It can be seen as a type-safe of SQL and Criteria style querying APIs.

A: 

I have modified the Hibernate Criteria API to generate JPQL queries. Name of my project is Criteria2JPQL:

https://sourceforge.net/projects/criteria2jpql/

omers