public final class JpaSpecificationUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
JpaSpecificationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.persistence.criteria.Predicate |
getStringLikeOrEqualPredicate(javax.persistence.criteria.CriteriaBuilder cb,
javax.persistence.criteria.Expression<java.lang.String> expression,
java.lang.String value)
Create either an equals or like predicate based on the presence of the '%' character in the search value.
|
static java.lang.String |
getTagLikeString(java.util.Set<java.lang.String> tags)
Get the sorted like statement for tags used in specification queries.
|
public static javax.persistence.criteria.Predicate getStringLikeOrEqualPredicate(@NotNull
javax.persistence.criteria.CriteriaBuilder cb,
@NotNull
javax.persistence.criteria.Expression<java.lang.String> expression,
@NotNull
java.lang.String value)
cb - The criteria builder to use for predicate creationexpression - The expression of the field the predicate is acting onvalue - The value to compare the field topublic static java.lang.String getTagLikeString(@NotNull
java.util.Set<java.lang.String> tags)
tags - The tags to use. Not null.