public class QueryUtil extends QueryHelper
static access to features of QueryHelper.| Modifier and Type | Field and Description |
|---|---|
private static QueryUtil |
INSTANCE |
QUERY_PROPERTY_TIMEOUT| Constructor and Description |
|---|
QueryUtil() |
| Modifier and Type | Method and Description |
|---|---|
<E> org.springframework.data.domain.Page<E> |
findPaginated(org.springframework.data.domain.Pageable pageable,
com.querydsl.jpa.impl.JPAQuery<E> query,
boolean determineTotal)
Returns a
Page of entities according to the supplied Pageable and JPAQuery. |
static QueryUtil |
get() |
<T> com.querydsl.core.types.dsl.BooleanExpression |
newInClause(com.querydsl.core.types.dsl.SimpleExpression<T> expression,
Collection<T> inValues) |
com.querydsl.core.types.dsl.BooleanExpression |
newLikeClause(com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring) |
com.querydsl.core.types.dsl.BooleanExpression |
newLikeClause(com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring,
boolean negate) |
com.querydsl.core.types.dsl.BooleanExpression |
newNotLikeClause(com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring) |
com.querydsl.core.types.dsl.BooleanExpression |
newStringClause(com.querydsl.core.types.dsl.StringExpression expression,
String value,
StringSearchConfigTo config) |
com.querydsl.core.types.dsl.BooleanExpression |
newStringClause(com.querydsl.core.types.dsl.StringExpression expression,
String value,
StringSearchOperator operator,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring) |
<T> void |
whereIn(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.SimpleExpression<T> expression,
Collection<T> inValues) |
void |
whereLike(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring) |
void |
whereNotLike(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring) |
void |
whereString(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.StringExpression expression,
String value,
StringSearchConfigTo config) |
applySort, applyTimeout, findPaginatedGenericprivate static final QueryUtil INSTANCE
public void whereLike(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring)
whereLike in class QueryHelperquery - the JPAQuery to modify.expression - the StringExpression to create the LIKE-clause
from.pattern - the pattern for the LIKE-clause to create.syntax - the LikePatternSyntax of the given pattern.ignoreCase - - true to ignore the case, false otherwise (to search case-sensitive).matchSubstring - - true to match also if the given pattern shall also match substrings on the
given StringExpression.public com.querydsl.core.types.dsl.BooleanExpression newLikeClause(com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring,
boolean negate)
newLikeClause in class QueryHelperexpression - the StringExpression to create the LIKE-clause
from.pattern - the pattern for the LIKE-clause to create.syntax - the LikePatternSyntax of the given pattern.ignoreCase - - true to ignore the case, false otherwise (to search case-sensitive).matchSubstring - - true to match also if the given pattern shall also match substrings on the
given StringExpression.negate - - true for NOT LIKE, false for
LIKE.BooleanExpression.public com.querydsl.core.types.dsl.BooleanExpression newStringClause(com.querydsl.core.types.dsl.StringExpression expression,
String value,
StringSearchConfigTo config)
newStringClause in class QueryHelperexpression - the StringExpression to search on.value - the string value or pattern to search for.config - the StringSearchConfigTo to configure the search. May be null for regular equals
search as default fallback.BooleanExpression for the specified string comparison clause.public com.querydsl.core.types.dsl.BooleanExpression newStringClause(com.querydsl.core.types.dsl.StringExpression expression,
String value,
StringSearchOperator operator,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring)
newStringClause in class QueryHelperexpression - the StringExpression to search on.value - the string value or pattern to search for.operator - the StringSearchOperator used to compare the search string value.syntax - the LikePatternSyntax of the given pattern.ignoreCase - - true to ignore the case, false otherwise (to search case-sensitive).matchSubstring - - true to match also if the given pattern shall also match substrings on the
given StringExpression.BooleanExpression for the specified string comparison clause.public void whereString(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.StringExpression expression,
String value,
StringSearchConfigTo config)
whereString in class QueryHelperquery - the JPAQuery to modify.expression - the StringExpression to search on.value - the string value or pattern to search for.config - the StringSearchConfigTo to configure the search. May be null for regular equals
search.public void whereNotLike(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring)
whereNotLike in class QueryHelperquery - the JPAQuery to modify.expression - the StringExpression to create the NOT
LIKE-clause from.pattern - the pattern for the NOT LIKE-clause to create.syntax - the LikePatternSyntax of the given pattern.ignoreCase - - true to ignore the case, false otherwise (to search case-sensitive).matchSubstring - - true to match also if the given pattern shall also match substrings on the
given StringExpression.public com.querydsl.core.types.dsl.BooleanExpression newLikeClause(com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring)
newLikeClause in class QueryHelperexpression - the StringExpression to create the LIKE-clause
from.pattern - the pattern for the LIKE-clause to create.syntax - the LikePatternSyntax of the given pattern.ignoreCase - - true to ignore the case, false otherwise (to search case-sensitive).matchSubstring - - true to match also if the given pattern shall also match substrings on the
given StringExpression.BooleanExpression.public com.querydsl.core.types.dsl.BooleanExpression newNotLikeClause(com.querydsl.core.types.dsl.StringExpression expression,
String pattern,
LikePatternSyntax syntax,
boolean ignoreCase,
boolean matchSubstring)
newNotLikeClause in class QueryHelperexpression - the StringExpression to create the NOT
LIKE-clause from.pattern - the pattern for the NOT LIKE-clause to create.syntax - the LikePatternSyntax of the given pattern.ignoreCase - - true to ignore the case, false otherwise (to search case-sensitive).matchSubstring - - true to match also if the given pattern shall also match substrings on the
given StringExpression.BooleanExpression.public <T> com.querydsl.core.types.dsl.BooleanExpression newInClause(com.querydsl.core.types.dsl.SimpleExpression<T> expression,
Collection<T> inValues)
newInClause in class QueryHelperT - generic type of the Collection values for the IN-clause(s).expression - the SimpleExpression used to create the IN-clause(s).inValues - the Collection of values for the IN-clause(s).BooleanExpression for the IN-clause(s) oder
null if inValues is null or empty.public <T> void whereIn(com.querydsl.jpa.impl.JPAQuery<?> query,
com.querydsl.core.types.dsl.SimpleExpression<T> expression,
Collection<T> inValues)
whereIn in class QueryHelperT - generic type of the Collection values for the IN-clause(s).query - the JPAQuery where to add the
IN-clause(s) from the other given parameters.expression - the SimpleExpression used to create the IN-clause(s).inValues - the Collection of values for the IN-clause(s).QueryHelper.newInClause(SimpleExpression, Collection)public <E> org.springframework.data.domain.Page<E> findPaginated(org.springframework.data.domain.Pageable pageable,
com.querydsl.jpa.impl.JPAQuery<E> query,
boolean determineTotal)
Page of entities according to the supplied Pageable and JPAQuery.E - generic type of the entity.pageable - contains information about the requested page and sorting.query - is a query which is pre-configured with the desired conditions for the search.determineTotal - - true to determine the total number of hits,
false otherwise.Copyright © 2014–2019 devon4j-Team. All rights reserved.