Querydsl is a framework which enables the construction of statically typed SQL-like queries. Instead of writing queries as inline strings or externalizing them into XML files they can be constructed via a fluent API like Querydsl.
The benefits of using a fluent API in comparison to simple strings are for example
code completion in IDE
almost none syntactically invalid queries allowed
domain types and properties can be referenced safely
adopts better to refactoring changes in domain types