enhance SchemaStatVisitor

This commit is contained in:
温少
2012-02-23 20:22:11 +08:00
parent 94c5f6e420
commit 2d5c963201
6 changed files with 167 additions and 8 deletions
@@ -26,7 +26,7 @@ public class TableStat {
public int getDropCount() {
return dropCount;
}
public void incrementDropCount() {
dropCount++;
}
@@ -135,6 +135,70 @@ public class TableStat {
}
}
public static class Condition {
private Column column;
private String operator;
public Column getColumn() {
return column;
}
public void setColumn(Column column) {
this.column = column;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((column == null) ? 0 : column.hashCode());
result = prime * result + ((operator == null) ? 0 : operator.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;
}
Condition other = (Condition) obj;
if (column == null) {
if (other.column != null) {
return false;
}
} else if (!column.equals(other.column)) {
return false;
}
if (operator == null) {
if (other.operator != null) {
return false;
}
} else if (!operator.equals(other.operator)) {
return false;
}
return true;
}
public String toString() {
return this.column.toString() + " " + this.operator;
}
}
public static class Column {
private String table;