Where { public static Where and(Where... wheres) { return Where.make("AND", Type.AND, wheres); } private  Where();  Where(String sql, Object... parameters);  Where(String sql, List<Object> parameters); static Where not(Where other); static Where and(Where... wheres); static Where or(Where... wheres); Where and(Where other); Where or(Where other); String toString(); List<Object> getParameters(); String getSql(); String getSqlWithoutAliasPrefix(String aliasName);  }
@Test public void testAnd() { Where w1 = new Where("a = ?", 1); Where w2 = new Where("b = ?", 2); Assert.assertEquals(Join.lines( "a = ?", "AND b = ?"), w1.and(w2).getSql()); Where w3 = new Where("c = ?", 3); Assert.assertEquals(Join.lines( "a = ?", "AND b = ?", "AND c = ?"), w1.and(w2).and(w3).getSql()); }