@Test public void testNotIn() throws Exception { Dao<Foo, String> dao = createDao(Foo.class, true); Foo foo1 = new Foo(); foo1.val = 63465365; assertEquals(1, dao.create(foo1)); Foo foo2 = new Foo(); foo2 = new Foo(); foo2.val = 163123; assertEquals(1, dao.create(foo2)); List<Foo> results = dao.queryBuilder().where().in(Foo.ID_COLUMN_NAME, foo2.id).query(); assertEquals(1, results.size()); assertEquals(foo2.val, results.get(0).val); results = dao.queryBuilder().where().not().in(Foo.ID_COLUMN_NAME, foo2.id).query(); assertEquals(1, results.size()); assertEquals(foo1.val, results.get(0).val); results = dao.queryBuilder().where().notIn(Foo.ID_COLUMN_NAME, foo2.id).query(); assertEquals(1, results.size()); assertEquals(foo1.val, results.get(0).val); }
public Where<T, ID> notIn(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects, false)); return this; }
Where { public Where<T, ID> notIn(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects, false)); return this; } }
Where { public Where<T, ID> notIn(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects, false)); return this; } protected  Where(TableInfo<T, ID> tableInfo, StatementBuilder<T, ID> statementBuilder, DatabaseType databaseType); }
Where { public Where<T, ID> notIn(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects, false)); return this; } protected  Where(TableInfo<T, ID> tableInfo, StatementBuilder<T, ID> statementBuilder, DatabaseType databaseType); Where<T, ID> and(); Where<T, ID> and(Where<T, ID> first, Where<T, ID> second, Where<T, ID>... others); Where<T, ID> and(int numClauses); Where<T, ID> between(String columnName, Object low, Object high); Where<T, ID> eq(String columnName, Object value); Where<T, ID> ge(String columnName, Object value); Where<T, ID> gt(String columnName, Object value); Where<T, ID> in(String columnName, Iterable<?> objects); Where<T, ID> notIn(String columnName, Iterable<?> objects); Where<T, ID> in(String columnName, Object... objects); Where<T, ID> notIn(String columnName, Object... objects); Where<T, ID> in(String columnName, QueryBuilder<?, ?> subQueryBuilder); Where<T, ID> notIn(String columnName, QueryBuilder<?, ?> subQueryBuilder); Where<T, ID> exists(QueryBuilder<?, ?> subQueryBuilder); Where<T, ID> isNull(String columnName); Where<T, ID> isNotNull(String columnName); Where<T, ID> le(String columnName, Object value); Where<T, ID> lt(String columnName, Object value); Where<T, ID> like(String columnName, Object value); Where<T, ID> ne(String columnName, Object value); Where<T, ID> not(); Where<T, ID> not(Where<T, ID> comparison); Where<T, ID> or(); Where<T, ID> or(Where<T, ID> left, Where<T, ID> right, Where<T, ID>... others); Where<T, ID> or(int numClauses); Where<T, ID> idEq(ID id); Where<T, ID> idEq(Dao<OD, ?> dataDao, OD data); Where<T, ID> raw(String rawStatement, ArgumentHolder... args); Where<T, ID> rawComparison(String columnName, String rawOperator, Object value); PreparedQuery<T> prepare(); List<T> query(); GenericRawResults<String[]> queryRaw(); T queryForFirst(); String[] queryRawFirst(); long countOf(); CloseableIterator<T> iterator(); Where<T, ID> reset(); String getStatement(); @Override String toString(); }
Where { public Where<T, ID> notIn(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects, false)); return this; } protected  Where(TableInfo<T, ID> tableInfo, StatementBuilder<T, ID> statementBuilder, DatabaseType databaseType); Where<T, ID> and(); Where<T, ID> and(Where<T, ID> first, Where<T, ID> second, Where<T, ID>... others); Where<T, ID> and(int numClauses); Where<T, ID> between(String columnName, Object low, Object high); Where<T, ID> eq(String columnName, Object value); Where<T, ID> ge(String columnName, Object value); Where<T, ID> gt(String columnName, Object value); Where<T, ID> in(String columnName, Iterable<?> objects); Where<T, ID> notIn(String columnName, Iterable<?> objects); Where<T, ID> in(String columnName, Object... objects); Where<T, ID> notIn(String columnName, Object... objects); Where<T, ID> in(String columnName, QueryBuilder<?, ?> subQueryBuilder); Where<T, ID> notIn(String columnName, QueryBuilder<?, ?> subQueryBuilder); Where<T, ID> exists(QueryBuilder<?, ?> subQueryBuilder); Where<T, ID> isNull(String columnName); Where<T, ID> isNotNull(String columnName); Where<T, ID> le(String columnName, Object value); Where<T, ID> lt(String columnName, Object value); Where<T, ID> like(String columnName, Object value); Where<T, ID> ne(String columnName, Object value); Where<T, ID> not(); Where<T, ID> not(Where<T, ID> comparison); Where<T, ID> or(); Where<T, ID> or(Where<T, ID> left, Where<T, ID> right, Where<T, ID>... others); Where<T, ID> or(int numClauses); Where<T, ID> idEq(ID id); Where<T, ID> idEq(Dao<OD, ?> dataDao, OD data); Where<T, ID> raw(String rawStatement, ArgumentHolder... args); Where<T, ID> rawComparison(String columnName, String rawOperator, Object value); PreparedQuery<T> prepare(); List<T> query(); GenericRawResults<String[]> queryRaw(); T queryForFirst(); String[] queryRawFirst(); long countOf(); CloseableIterator<T> iterator(); Where<T, ID> reset(); String getStatement(); @Override String toString();  }