some filter conditions
This commit is contained in:
parent
7a2ce6b2ad
commit
bf11721159
|
@ -132,17 +132,15 @@ public class DatasourceSpecs {
|
|||
private static Predicate likeSearchList(final Root<?> r, final CriteriaBuilder cb, final Entry<FilterName, Object> e) {
|
||||
final String key = e.getKey().name();
|
||||
|
||||
log.info("key : " + key);
|
||||
log.info("val : " + e.getValue());
|
||||
|
||||
final Predicate[] arr =
|
||||
Arrays.stream(e.getValue().toString().split(","))
|
||||
.map(String::trim)
|
||||
.map(String::toLowerCase)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.map(s -> cb.like(cb.lower(r.get(key)), WILDCARD + s + WILDCARD))
|
||||
.toArray(size -> new Predicate[size]);
|
||||
|
||||
return cb.or(arr);
|
||||
|
||||
}
|
||||
|
||||
// search by ID, managed. exact match
|
||||
|
|
Loading…
Reference in New Issue