QueryStream: Build JPA Criteria queries using a Stream-like API

I do a lot of JPA/Criteria programming and over time have gotten tired of the verbose syntax required when building JPA queries.

After some thought I decided to create an alternative which is modeled after the Java 8 Stream API.

I’ve been using it for a couple of years now, and it is working nicely and is now my preferred way to build queries.

It’s available on github and in Maven central if anyone is interested in trying it out:

Let me know what you think.

-Archie

Cool stuff. Maybe you also like this library called JINQ which tries to achieve something similar. I personally create a library called Blaze-Persistence that allows writing queries in a fluent fashion as well, although not compile time type safe yet. It provides some of the more advanced SQL features though on top of the JPA model like CTEs, recursive CTEs, subqueries in the FROM clause, set operation(UNION, INTERSECT, EXCEPT) support and much more.

Thanks for the links, interesting stuff.