JPA Criteria API by samples — Part-I

altuure
altuure in altuure
Sep 23, 2010 · 2 min read

Although examples are pretty much simple it will help you with finalized version of JPA 2.0 API.

For Part II please read JPA Criteria API by samples — Part-II

and in this examples in my opinion building query by programming is not so easy and maintainable but still possible.

PS: I tested it with hibernate 3.5.1

Simple Query

Simple Query with Order

Simple Query with selected fields

Query with single criteria

Query with multiple criterias

Query with single literal

Query with summary (min,max,avg)

Query with aggreation (group by)

altuure

Continous Developer Blog

altuure

Written by

altuure

#expat #amsterdam #cycling

altuure

altuure

Continous Developer Blog