Class Querydsl
java.lang.Object
org.springframework.data.jpa.repository.support.Querydsl
Helper instance to ease access to Querydsl JPA query API.
- Author:
- Oliver Gierke, Thomas Darimont, Mark Paluch, Christoph Strobl, Marcus Voltolim, Donghun Shin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> com.querydsl.jpa.JPQLQuery<T>
applyPagination
(Pageable pageable, com.querydsl.jpa.JPQLQuery<T> query) Applies the givenPageable
to the givenJPQLQuery
.<T> com.querydsl.jpa.JPQLQuery<T>
applySorting
(Sort sort, com.querydsl.jpa.JPQLQuery<T> query) Applies sorting to the givenJPQLQuery
.<T> com.querydsl.jpa.impl.AbstractJPAQuery<T,
com.querydsl.jpa.impl.JPAQuery<T>> Creates theJPQLQuery
instance based on the configuredEntityManager
.createQuery
(com.querydsl.core.types.EntityPath<?>... paths) Creates theJPQLQuery
instance based on the configuredEntityManager
.
-
Constructor Details
-
Querydsl
public Querydsl(jakarta.persistence.EntityManager em, com.querydsl.core.types.dsl.PathBuilder<?> builder) - Parameters:
em
- must not be null.builder
- must not be null.
-
-
Method Details
-
createQuery
public <T> com.querydsl.jpa.impl.AbstractJPAQuery<T,com.querydsl.jpa.impl.JPAQuery<T>> createQuery()Creates theJPQLQuery
instance based on the configuredEntityManager
. -
createQuery
public com.querydsl.jpa.impl.AbstractJPAQuery<Object,com.querydsl.jpa.impl.JPAQuery<Object>> createQuery(com.querydsl.core.types.EntityPath<?>... paths) Creates theJPQLQuery
instance based on the configuredEntityManager
.- Parameters:
paths
- must not be null.
-
applyPagination
public <T> com.querydsl.jpa.JPQLQuery<T> applyPagination(Pageable pageable, com.querydsl.jpa.JPQLQuery<T> query) Applies the givenPageable
to the givenJPQLQuery
.- Parameters:
pageable
- must not be null.query
- must not be null.- Returns:
- the Querydsl
JPQLQuery
.
-
applySorting
public <T> com.querydsl.jpa.JPQLQuery<T> applySorting(Sort sort, com.querydsl.jpa.JPQLQuery<T> query) Applies sorting to the givenJPQLQuery
.- Parameters:
sort
- must not be null.query
- must not be null.- Returns:
- the Querydsl
JPQLQuery
-