public class QueryHelper
extends java.lang.Object
| Constructor and Description |
|---|
QueryHelper() |
| Modifier and Type | Method and Description |
|---|---|
static com.mysema.query.types.Expression<java.lang.Double> |
days(com.mysema.query.types.Path<TimeInterval> path)
Returns an expression which represents the number of days on this interval
|
static <RT,Q extends com.mysema.query.support.ProjectableQuery<Q>> |
page(Q query,
SessionData sessionData,
java.lang.Integer currentPage,
java.lang.Integer pageSize,
com.mysema.query.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.mysema.query.support.ProjectableQuery<Q>> |
page(Q query,
SessionData sessionData,
QueryParameters queryParameters,
com.mysema.query.types.Expression<RT> expr)
Returns a result page for the given query and page parameters, using the given expression for projection
|
static <T> com.mysema.query.types.path.PathBuilder<T> |
pathBuilder(java.lang.Class<T> clazz)
Returns a path builder for the given entity class
|
static <T> long |
processBatch(org.cyclos.impl.utils.persistence.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 com.mysema.query.types.Expression<java.lang.Double> days(com.mysema.query.types.Path<TimeInterval> path)
public static <RT,Q extends com.mysema.query.support.ProjectableQuery<Q>> Page<RT> page(Q query, SessionData sessionData, java.lang.Integer currentPage, java.lang.Integer pageSize, com.mysema.query.types.Expression<RT> expr)
public static <RT,Q extends com.mysema.query.support.ProjectableQuery<Q>> Page<RT> page(Q query, SessionData sessionData, QueryParameters queryParameters, com.mysema.query.types.Expression<RT> expr)
public static <T> com.mysema.query.types.path.PathBuilder<T> pathBuilder(java.lang.Class<T> clazz)
public static <T> long processBatch(org.cyclos.impl.utils.persistence.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)