Mercurial > lada > lada-server
changeset 585:f17c0e685c47
Make 'and-/or like' operations case insensitive
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 23 Mar 2015 17:55:02 +0100 |
parents | 6de05718ac8d |
children | 7f5e2e68c765 |
files | src/main/java/de/intevation/lada/util/data/QueryBuilder.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/util/data/QueryBuilder.java Mon Mar 23 17:53:47 2015 +0100 +++ b/src/main/java/de/intevation/lada/util/data/QueryBuilder.java Mon Mar 23 17:55:02 2015 +0100 @@ -83,7 +83,7 @@ */ public QueryBuilder<T> andLike(String id, String value) { Path<String> path = this.root.get(id); - Predicate p = this.builder.like(path, value); + Predicate p = this.builder.like(this.builder.lower(path), value); if (this.filter != null) { this.filter = this.builder.and(this.filter, p); } @@ -120,7 +120,7 @@ */ public QueryBuilder<T> orLike(String id, String value) { Path<String> path = this.root.get(id); - Predicate p = this.builder.like(path, value); + Predicate p = this.builder.like(this.builder.lower(path), value); if (this.filter != null) { this.filter = this.builder.or(this.filter, p); }