Esempio n. 1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   SQLSelectQueryBlock other = (SQLSelectQueryBlock) obj;
   if (parenthesized ^ other.parenthesized) return false;
   if (distionOption != other.distionOption) return false;
   if (from == null) {
     if (other.from != null) return false;
   } else if (!from.equals(other.from)) return false;
   if (groupBy == null) {
     if (other.groupBy != null) return false;
   } else if (!groupBy.equals(other.groupBy)) return false;
   if (into == null) {
     if (other.into != null) return false;
   } else if (!into.equals(other.into)) return false;
   if (selectList == null) {
     if (other.selectList != null) return false;
   } else if (!selectList.equals(other.selectList)) return false;
   if (where == null) {
     if (other.where != null) return false;
   } else if (!where.equals(other.where)) return false;
   return true;
 }
Esempio n. 2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + (Boolean.valueOf(parenthesized).hashCode());
   result = prime * result + distionOption;
   result = prime * result + ((from == null) ? 0 : from.hashCode());
   result = prime * result + ((groupBy == null) ? 0 : groupBy.hashCode());
   result = prime * result + ((into == null) ? 0 : into.hashCode());
   result = prime * result + ((selectList == null) ? 0 : selectList.hashCode());
   result = prime * result + ((where == null) ? 0 : where.hashCode());
   return result;
 }
 public void setDatabase(SQLExpr database) {
   if (database != null) {
     database.setParent(this);
   }
   this.database = database;
 }
Esempio n. 4
0
 public void setWhere(SQLExpr where) {
   if (where != null) {
     where.setParent(this);
   }
   this.where = where;
 }
Esempio n. 5
0
 /**
  * 通过正则表达式拆分where后的数据
  *
  * @author gaoxianglong
  */
 public List<String> getWhere_() {
   return Arrays.asList(where.toString().split("\\s"));
 }
Esempio n. 6
0
 public void setDefaultExpr(SQLExpr defaultExpr) {
   if (defaultExpr != null) {
     defaultExpr.setParent(this);
   }
   this.defaultExpr = defaultExpr;
 }