changeset 693:ca536cd50120

Added logical or for integer lists.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Jul 2015 09:41:47 +0200
parents ae33fdecd9e2
children c0da629ba69d
files src/main/java/de/intevation/lada/util/data/QueryBuilder.java
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/util/data/QueryBuilder.java	Tue Jul 07 11:58:46 2015 +0200
+++ b/src/main/java/de/intevation/lada/util/data/QueryBuilder.java	Wed Jul 08 09:41:47 2015 +0200
@@ -180,6 +180,21 @@
     }
 
     /**
+     * Logical OR operation.
+     * All elements in <i>values</i> will be concatenated with OR operator.
+     *
+     * @param id        The database column name.
+     * @param values    List of values.
+     * @return The builder itself.
+     */
+    public QueryBuilder<T> orIntList(String id, List<Integer> values) {
+        for (Integer v: values) {
+            this.or(id, v);
+        }
+        return this;
+    }
+
+    /**
      * Logical AND operation.
      * The actually defined query will be concatenated with the query defined
      * in the builder <i>b</i>.
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)