@Override
    public void addToSql(final SqlBuilder sqlBuilder) {
        final String colName = getSqlColumnName();
        final T sqlNullValue = getSqlNullValue();
        boolean addNull = false;
        if (colName != null && !getValues().isEmpty()) {
            final StringBuilder sb = new StringBuilder(sqlBuilder.getMainTableId() + "." + colName + " IN (");
            final List<String> params = new ArrayList<>();
            boolean first = true;
            for (T rawV : getRawValues()) {
                if (rawV == null) {
                    continue;
                }
                if (rawV.equals(sqlNullValue)) {
                    addNull = true;
                }
                if (!first) {
                    sb.append(",");
                }
                first = false;
                sb.append("?");
                params.add(valueToSqlValue(rawV));
            }
            sb.append(")");
            if (addNull) {
                sqlBuilder.openWhere(SqlBuilder.WhereType.OR);
                sqlBuilder.addWhere(sqlBuilder.getMainTableId() + "." + colName + " IS NULL");
            }
            sqlBuilder.addWhere(sb.toString(), params);
            if (addNull) {
                sqlBuilder.closeWhere();
            }

        } else {
            sqlBuilder.addWhereTrue();
        }
    }
Base class for filters where a cache can have one value out of a group of values
(e.g. cache type, cache size etc). Filter checks whether the cache value is in a to-be-filtered set of such values.
<br>
This class supports grouping of selectable values, e.g. a bunch of selectable values can be grouped,
and by selecing the group the filter checks for the cache to have any "raw" value assigned to this group

@param <T> class for "raw" cache values to filter
@param <G> class for "Groups". Might be same as T, in this case the filter has autosupport for
           the case that each group (of class G) has exactly one (=the same) element of class T
main/src/main/java/cgeo/geocaching/filters/core/ValueGroupGeocacheFilter.java