Querydsl

Description

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including JPA, JDO and SQL.

Instead of writing queries as inline strings or externalizing them into XML files they are constructed via a fluent API.

The benefits of using a fluent API in comparison to simple strings are

  • 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

Modules

Module
description
artifactId
depends on
Core
core API of Querydsl
querydsl-core
 
APT
APT based code generation
querydsl-apt
Core
SQL
JDBC/SQL support
querydsl-sql
Core, APT
Lucene
Lucene support
querydsl-lucene
Core
Collections
Java collections support
querydsl-collections
Core
HQL
HQL/JPQL support
querydsl-hql
Core, APT, SQL
JDOQL
JDOQL support
querydsl-jdoql
Core, APT
Hibernate Search
Hibernate Search support
querydsl-hibernate-search
Core, Lucene

Supported backends

JPA / Hibernate

JDO

Java Collections

SQL

RDF

Lucene

Hibernate Search

Go to Documentation for Javadocs and the Reference Documentation and go to Examples to see examples.

In a nutshell

Name Querydsl
Most Recent Version 1.8.0
Javadocs v 1.8.0
Documentation Documentation
Downloads Downloads
State Stable
License LGPL v2.1
Version Control on Mysema Source
Maven repo on Mysema Source
Issue Management on Launchpad
Commercial Support contact us

Querydsl users talking

"If you are using JPA and want to write typesafe queries in an IDE, then stop using the JPA 2.0 Criteria API and start using Querydsl. Today."

Bob Walker

"So, here is my tip to anyone thinking about using a Criteria API: Give Querydsl a try! By the way, did I mention that it can also be used with JDO, Lucene, JDBC and even plain collections? "

Luis Fernando Planella Gonzalez

"Querydsl rocks! It's the best thing since sliced bread for data access in Java."

Alex Besogonov

"Using querydsl you keep the reference to your HibernateQuery object and you can apply as many joins, wheres etc as you can, in any order, so that you can get a totally mutable hql query without ugly string concatenation. "

Lukasz Wisniewski

"Querydsl has been easy to get running, and easy to write compact and readable queries in. Integration in an existing project has been as painless as it could be, and we have had almost no problems."

Stein Magnus Jodal

Got issues with Querydsl?

Post a bug on Launchpad or ask a question in the Forum.

Bookmark with: del.icio.us   digg   Mister Wong   YahooMyWeb   Reddit   Furl   Spurl   blogmarks

Labels

querydsl querydsl Delete
frontpage frontpage Delete
dsl dsl Delete
jpa jpa Delete
collections collections Delete
hql hql Delete
jpaql jpaql Delete
sql sql Delete
java java Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.