Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including JPA, JDO and SQL in Java.
Instead of writing queries as inline strings or externalizing them into XML files they are constructed via a fluent API.
Code completion in IDE (all properties, methods and operations can be expanded in your favorite Java IDE)
Almost no syntactically invalid queries allowed (type-safe on all levels)
Domain types and properties can be referenced safely (no Strings involved!)
Adopts better to refactoring changes in domain types
Incremental query definition is easier
Querydsl is licensed under the LGPL 2.1 license.