protected SqlPredicateFragment inHelper(String cn,
                                            FieldPredicate<?> model,
                                            boolean negated) {

        final Set<?> set = getFirstOperandAsRawSet(model);
        if (set.isEmpty()) {
            return negated ? alwaysTrue() : alwaysFalse();
        } else if (set.size() == 1) {
            final Object arg = set.iterator().next();
            return negated
                ? notEqualHelper(cn, arg)
                : equalHelper(cn, arg);
        } else {
            return of("(" + cn + " IN (" +
                set.stream().map(unused -> "?").collect(joining(",")) +
                "))", negated
            ).addAll(set);
        }
    }
@author Per Minborg
@author Emil Forslund
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/abstracts/AbstractFieldPredicateView.java