Exemplo 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;
   }
   SQLQuery other = (SQLQuery) obj;
   if (select == null) {
     if (other.select != null) {
       return false;
     }
   } else if (!select.equals(other.select)) {
     return false;
   }
   if (from == null) {
     if (other.from != null) {
       return false;
     }
   } else if (!from.equals(other.from)) {
     return false;
   }
   if (where == null) {
     if (other.where != null) {
       return false;
     }
   } else if (!where.equals(other.where)) {
     return false;
   }
   if (orderBy == null) {
     if (other.orderBy != null) {
       return false;
     }
   } else if (!orderBy.equals(other.orderBy)) {
     return false;
   }
   if (groupBy == null) {
     if (other.groupBy != null) {
       return false;
     }
   } else if (!groupBy.equals(other.groupBy)) {
     return false;
   }
   if (having == null) {
     if (other.having != null) {
       return false;
     }
   } else if (!having.equals(other.having)) {
     return false;
   }
   if (limit != other.limit) {
     return false;
   }
   if (offset != other.offset) {
     return false;
   }
   return true;
 }