Exemplo n.º 1
0
 /**
  * add AND condition
  *
  * @param where expr("[AND] (" + where.toString() + ")")
  * @return
  */
 public WhereBuilder and(WhereBuilder where) {
   String condition = whereItems.size() == 0 ? " " : "AND ";
   return expr(condition + "(" + where.toString() + ")");
 }
Exemplo n.º 2
0
 /**
  * create new instance
  *
  * @param columnName
  * @param op operator: "=","LIKE","IN","BETWEEN"...
  * @param value
  * @return
  */
 public static WhereBuilder b(String columnName, String op, Object value) {
   WhereBuilder result = new WhereBuilder();
   result.appendCondition(null, columnName, op, value);
   return result;
 }