Spring Data Jpa

org.springframework.data.jpa.repository.support
Class Querydsl

java.lang.Object
  extended by org.springframework.data.jpa.repository.support.Querydsl

public class Querydsl
extends Object

Helper instance to ease access to Querydsl JPA query API.

Author:
Oliver Gierke

Constructor Summary
Querydsl(javax.persistence.EntityManager em, com.mysema.query.types.path.PathBuilder<?> builder)
          Creates a new Querydsl for the given EntityManager and PathBuilder.
 
Method Summary
 com.mysema.query.jpa.JPQLQuery applyPagination(Pageable pageable, com.mysema.query.jpa.JPQLQuery query)
          Applies the given Pageable to the given JPQLQuery.
 com.mysema.query.jpa.JPQLQuery applySorting(Sort sort, com.mysema.query.jpa.JPQLQuery query)
          Applies sorting to the given JPQLQuery.
 com.mysema.query.jpa.JPQLQuery createQuery()
          Creates the JPQLQuery instance based on the configured EntityManager.
 com.mysema.query.jpa.JPQLQuery createQuery(com.mysema.query.types.EntityPath<?>... paths)
          Creates the JPQLQuery instance based on the configured EntityManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Querydsl

public Querydsl(javax.persistence.EntityManager em,
                com.mysema.query.types.path.PathBuilder<?> builder)
Creates a new Querydsl for the given EntityManager and PathBuilder.

Parameters:
em - must not be null.
builder - must not be null.
Method Detail

createQuery

public com.mysema.query.jpa.JPQLQuery createQuery()
Creates the JPQLQuery instance based on the configured EntityManager.

Returns:

createQuery

public com.mysema.query.jpa.JPQLQuery createQuery(com.mysema.query.types.EntityPath<?>... paths)
Creates the JPQLQuery instance based on the configured EntityManager.

Returns:

applyPagination

public com.mysema.query.jpa.JPQLQuery applyPagination(Pageable pageable,
                                                      com.mysema.query.jpa.JPQLQuery query)
Applies the given Pageable to the given JPQLQuery.

Parameters:
pageable -
query - must not be null.
Returns:
the Querydsl JPQLQuery.

applySorting

public com.mysema.query.jpa.JPQLQuery applySorting(Sort sort,
                                                   com.mysema.query.jpa.JPQLQuery query)
Applies sorting to the given JPQLQuery.

Parameters:
sort -
query - must not be null.
Returns:
the Querydsl JPQLQuery

Spring Data Jpa

Copyright © 2011-2012-2012 SpringSource. All Rights Reserved.