예제 #1
0
 public ISelecter whereRightLike(String column, Object value) {
   Rule r = new Rule();
   r.setColumn(column);
   r.setOpStart(" like ");
   wheres.add(r);
   paramWheres.add("%" + value);
   return this;
 }
예제 #2
0
 public ISelecter column(String... column) {
   for (String c : column) {
     Rule rule = new Rule();
     rule.setColumn(c);
     cols.add(rule);
   }
   return this;
 }
예제 #3
0
 public ISelecter where(String sql) {
   Rule r = new Rule();
   r.setColumn(sql);
   r.setOpStart("");
   r.setTag("");
   r.setOpEnd("");
   wheres.add(r);
   return this;
 }
예제 #4
0
 public IExecuter whereSql(String sql, Object[] values) {
   Rule r = new Rule();
   r.setColumn(sql);
   r.setOpStart("");
   r.setTag("");
   r.setOpEnd("");
   wheres.add(r);
   for (Object v : values) {
     paramWheres.add(v);
   }
   return this;
 }
예제 #5
0
 public ISelecter whereNq(String column, Object value) {
   Rule r = new Rule();
   r.setColumn(column);
   if (null != value) {
     r.setOpStart("!=");
     paramWheres.add(value);
   } else {
     r.setOpStart(" IS NOT NULL");
     r.setTag("");
   }
   wheres.add(r);
   return this;
 }
예제 #6
0
 protected IExecuter whereNotIn(String column, Object... value) {
   Rule r = new Rule();
   r.setColumn(column);
   r.setOpStart(" not in (");
   r.setOpEnd(")");
   StringBuilder tag = new StringBuilder();
   List<Object> l = objectsToList(value);
   for (Object o : l) {
     tag.append(",?");
     paramWheres.add(o);
   }
   r.setTag(l.size() > 0 ? tag.toString().substring(1) : "");
   wheres.add(r);
   return this;
 }