mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase & remove unused code
This commit is contained in:
@@ -42,16 +42,24 @@ public class SQLOrderBy extends SQLObjectImpl {
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
public void output(StringBuffer buf) {
|
||||
buf.append("ORDER ");
|
||||
buf.append("BY ");
|
||||
|
||||
int i = 0;
|
||||
for (int size = this.items.size(); i < size; ++i) {
|
||||
if (i != 0) {
|
||||
buf.append(", ");
|
||||
}
|
||||
this.items.get(i).output(buf);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((items == null) ? 0 : items.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) return true;
|
||||
if (obj == null) return false;
|
||||
if (getClass() != obj.getClass()) return false;
|
||||
SQLOrderBy other = (SQLOrderBy) obj;
|
||||
if (items == null) {
|
||||
if (other.items != null) return false;
|
||||
} else if (!items.equals(other.items)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user