@Test(expected = IllegalArgumentException.class) public void testAppendValueNull() throws Exception { List<Object> objList = new ArrayList<Object>(); objList.add(null); In in = new In("foo", numberFieldType, objList, true); in.appendValue(null, new StringBuilder(), null); }
@Override public void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList) throws SQLException { sb.append('('); boolean first = true; for (Object value : objects) { if (value == null) { throw new IllegalArgumentException("one of the IN values for '" + columnName + "' is null"); } if (first) { first = false; } else { sb.append(','); } super.appendArgOrValue(databaseType, fieldType, sb, columnArgList, value); } sb.append(") "); }
In extends BaseComparison { @Override public void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList) throws SQLException { sb.append('('); boolean first = true; for (Object value : objects) { if (value == null) { throw new IllegalArgumentException("one of the IN values for '" + columnName + "' is null"); } if (first) { first = false; } else { sb.append(','); } super.appendArgOrValue(databaseType, fieldType, sb, columnArgList, value); } sb.append(") "); } }
In extends BaseComparison { @Override public void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList) throws SQLException { sb.append('('); boolean first = true; for (Object value : objects) { if (value == null) { throw new IllegalArgumentException("one of the IN values for '" + columnName + "' is null"); } if (first) { first = false; } else { sb.append(','); } super.appendArgOrValue(databaseType, fieldType, sb, columnArgList, value); } sb.append(") "); } In(String columnName, FieldType fieldType, Iterable<?> objects, boolean in);  In(String columnName, FieldType fieldType, Object[] objects, boolean in); }
In extends BaseComparison { @Override public void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList) throws SQLException { sb.append('('); boolean first = true; for (Object value : objects) { if (value == null) { throw new IllegalArgumentException("one of the IN values for '" + columnName + "' is null"); } if (first) { first = false; } else { sb.append(','); } super.appendArgOrValue(databaseType, fieldType, sb, columnArgList, value); } sb.append(") "); } In(String columnName, FieldType fieldType, Iterable<?> objects, boolean in);  In(String columnName, FieldType fieldType, Object[] objects, boolean in); @Override void appendOperation(StringBuilder sb); @Override void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList); }
In extends BaseComparison { @Override public void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList) throws SQLException { sb.append('('); boolean first = true; for (Object value : objects) { if (value == null) { throw new IllegalArgumentException("one of the IN values for '" + columnName + "' is null"); } if (first) { first = false; } else { sb.append(','); } super.appendArgOrValue(databaseType, fieldType, sb, columnArgList, value); } sb.append(") "); } In(String columnName, FieldType fieldType, Iterable<?> objects, boolean in);  In(String columnName, FieldType fieldType, Object[] objects, boolean in); @Override void appendOperation(StringBuilder sb); @Override void appendValue(DatabaseType databaseType, StringBuilder sb, List<ArgumentHolder> columnArgList);  }