This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
JPA 2.0 has introduced Criteria API - basically building your queries using java objects and thereby do a compile time checking on the validity of the queries rather than realizing a wrong JPQL query syntax in runtime (plus java developers who are averse to SQL syntax might prefer this more),
As a developer to actually use Criteria API, you will be needing a metamodel class corresponding to the actual entities. These metamodel classes are typically generated
here is a nice article on it (and is actually the first link when you google ).