public class QueryHelper
extends java.lang.Object
| Constructor and Description |
|---|
QueryHelper() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Page<T> |
buildPage(SessionData sessionData,
java.util.List<T> list,
java.lang.Integer _currentPage,
java.lang.Integer _pageSize)
Builds a page from an in-memory list
|
static <T> Page<T> |
buildPage(SessionData sessionData,
java.util.List<T> list,
QueryParameters params)
Builds a page from an in-memory list
|
static com.querydsl.core.types.Expression<java.lang.Double> |
days(com.querydsl.core.types.Path<TimeInterval> path)
Returns an expression which represents the number of days on this interval
|
static <E extends java.lang.Enum<E>> |
enumOrdinal(com.querydsl.core.types.dsl.EnumPath<E> path)
Returns an expression that maps each enum value to its ordinal
|
static com.querydsl.core.types.OrderSpecifier<?> |
orderSpecifier(com.querydsl.core.types.EntityPath<?> path)
Returns an ascending order specifier suitable for the given entity path.
|
static com.querydsl.core.types.OrderSpecifier<?> |
orderSpecifier(com.querydsl.core.types.EntityPath<?> path,
boolean asc)
Returns an order specifier suitable for the given entity path.
|
static <RT,Q extends com.querydsl.jpa.JPAQueryBase<?,Q>> |
page(Q query,
SessionData sessionData,
java.lang.Integer _currentPage,
java.lang.Integer _pageSize,
com.querydsl.core.types.Expression<RT> expr)
Returns a result page for the given query and page parameters, using the given expression for projection
|
static <RT,Q extends com.querydsl.jpa.JPAQueryBase<?,Q>> |
page(Q query,
SessionData sessionData,
QueryParameters queryParameters,
com.querydsl.core.types.Expression<RT> expr)
Returns a result page for the given query and page parameters, using the given expression for projection
|
static <T> com.querydsl.core.types.dsl.PathBuilder<T> |
pathBuilder(java.lang.Class<T> clazz)
Returns a path builder for the given entity class
|
static <T> long |
processBatch(BaseEntityManagerHandler entityManagerHandler,
com.mysema.commons.lang.CloseableIterator<T> iterator,
org.apache.commons.collections15.Closure<T> closure)
Processes the given iterator, by using a
CacheFlusher, and invoking the given closure for each iterator
element. |
static boolean |
useParameter(java.lang.Object value)
Returns whether the parameter should be used to filter the query or not.
|
public static <T> Page<T> buildPage(SessionData sessionData, java.util.List<T> list, java.lang.Integer _currentPage, java.lang.Integer _pageSize)
public static <T> Page<T> buildPage(SessionData sessionData, java.util.List<T> list, QueryParameters params)
public static com.querydsl.core.types.Expression<java.lang.Double> days(com.querydsl.core.types.Path<TimeInterval> path)
public static <E extends java.lang.Enum<E>> com.querydsl.core.types.dsl.NumberExpression<java.lang.Integer> enumOrdinal(com.querydsl.core.types.dsl.EnumPath<E> path)
public static com.querydsl.core.types.OrderSpecifier<?> orderSpecifier(com.querydsl.core.types.EntityPath<?> path)
public static com.querydsl.core.types.OrderSpecifier<?> orderSpecifier(com.querydsl.core.types.EntityPath<?> path,
boolean asc)
public static <RT,Q extends com.querydsl.jpa.JPAQueryBase<?,Q>> Page<RT> page(Q query, SessionData sessionData, java.lang.Integer _currentPage, java.lang.Integer _pageSize, com.querydsl.core.types.Expression<RT> expr)
public static <RT,Q extends com.querydsl.jpa.JPAQueryBase<?,Q>> Page<RT> page(Q query, SessionData sessionData, QueryParameters queryParameters, com.querydsl.core.types.Expression<RT> expr)
public static <T> com.querydsl.core.types.dsl.PathBuilder<T> pathBuilder(java.lang.Class<T> clazz)
public static <T> long processBatch(BaseEntityManagerHandler entityManagerHandler, com.mysema.commons.lang.CloseableIterator<T> iterator, org.apache.commons.collections15.Closure<T> closure)
CacheFlusher, and invoking the given closure for each iterator
element. The
CloseableIterator.close() method is guaranteed to be invokedpublic static boolean useParameter(java.lang.Object value)