[Lada-commits] [PATCH 3 of 5] Allow filtering of columns of any type with IN()
Wald Commits
scm-commit at wald.intevation.org
Thu Feb 11 16:28:10 CET 2016
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1455204117 -3600
# Node ID 9cf4b2ac3e2a7aeff3ba75049485cef0965a3261
# Parent 06d1cace91416ff9f8ad873e50e53f463a43c8cc
Allow filtering of columns of any type with IN().
diff -r 06d1cace9141 -r 9cf4b2ac3e2a src/main/java/de/intevation/lada/util/data/QueryBuilder.java
--- a/src/main/java/de/intevation/lada/util/data/QueryBuilder.java Thu Feb 11 16:19:52 2016 +0100
+++ b/src/main/java/de/intevation/lada/util/data/QueryBuilder.java Thu Feb 11 16:21:57 2016 +0100
@@ -248,8 +248,8 @@
*
* @return The current Querybuilder.
*/
- public QueryBuilder<T> orIn(String key, List<String> values) {
- Expression<String> exp = this.root.get(key);
+ public <M> QueryBuilder<T> orIn(String key, List<M> values) {
+ Expression<M> exp = this.root.get(key);
Predicate p = exp.in(values);
if (this.filter == null) {
this.filter = this.builder.or(p);
@@ -269,8 +269,8 @@
*
* @return The current Querybuilder.
*/
- public QueryBuilder<T> andIn(String key, List<String> values) {
- Expression<String> exp = this.root.get(key);
+ public <M> QueryBuilder<T> andIn(String key, List<M> values) {
+ Expression<M> exp = this.root.get(key);
Predicate p = exp.in(values);
if (this.filter == null) {
this.filter = this.builder.and(p);
More information about the Lada-commits
mailing list