public EqualsBuilder appendArrays(Object[] o1, Object[] o2) { if (equals) { if (o1 == null) { o1 = new Object[0]; } if (o2 == null) { o2 = new Object[0]; } if (o1.length != o2.length) { equals = false; } else { for (int i = 0; i < o1.length; i++) { append(o1[i], o2[i]); } } } return this; }
public boolean equalsIgnoreAlias(SelectItem that, boolean exactColumnCompare) { if (that == null) { return false; } if (that == this) { return true; } final EqualsBuilder eb = new EqualsBuilder(); if (exactColumnCompare) { eb.append(this._column == that._column); eb.append(this._fromItem, that._fromItem); } else { eb.append(this._column, that._column); } eb.append(this._function, that._function); eb.appendArrays(this._functionParameters, that._functionParameters); eb.append(this._functionApproximationAllowed, that._functionApproximationAllowed); eb.append(this._expression, that._expression); if (_subQuerySelectItem != null) { eb.append(_subQuerySelectItem.equalsIgnoreAlias(that._subQuerySelectItem)); } else { if (that._subQuerySelectItem != null) { eb.append(false); } } return eb.isEquals(); }
public EqualsBuilder appendArrays(Object[] o1, Object[] o2) { if (equals) { if (o1 == null) { o1 = new Object[0]; } if (o2 == null) { o2 = new Object[0]; } if (o1.length != o2.length) { equals = false; } else { for (int i = 0; i < o1.length; i++) { append(o1[i], o2[i]); } } } return this; }
public boolean equalsIgnoreAlias(SelectItem that, boolean exactColumnCompare) { if (that == null) { return false; } if (that == this) { return true; } final EqualsBuilder eb = new EqualsBuilder(); if (exactColumnCompare) { eb.append(this._column == that._column); eb.append(this._fromItem, that._fromItem); } else { eb.append(this._column, that._column); } eb.append(this._function, that._function); eb.appendArrays(this._functionParameters, that._functionParameters); eb.append(this._functionApproximationAllowed, that._functionApproximationAllowed); eb.append(this._expression, that._expression); if (_subQuerySelectItem != null) { eb.append(_subQuerySelectItem.equalsIgnoreAlias(that._subQuerySelectItem)); } else { if (that._subQuerySelectItem != null) { eb.append(false); } } return eb.isEquals(); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (getClass() == obj.getClass()) { DataSetTableModel that = (DataSetTableModel) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(_materializedRows, that._materializedRows); eb.append(_selectItems, that._selectItems); return eb.isEquals(); } return false; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (getClass() == obj.getClass()) { DataSetTableModel that = (DataSetTableModel) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(_materializedRows, that._materializedRows); eb.append(_selectItems, that._selectItems); return eb.isEquals(); } return false; }
Object next1 = it1.next(); Object next2 = it2.next(); eb.append(next1, next2);
Object next1 = it1.next(); Object next2 = it2.next(); eb.append(next1, next2);
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof Schema) { Schema other = (Schema) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(getName(), other.getName()); eb.append(getQuote(), other.getQuote()); if (eb.isEquals()) { try { int tableCount1 = getTableCount(); int tableCount2 = other.getTableCount(); eb.append(tableCount1, tableCount2); } catch (Exception e) { // might occur when schemas are disconnected. Omit this // check then. } } return eb.isEquals(); } return false; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof Schema) { Schema other = (Schema) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(getName(), other.getName()); eb.append(getQuote(), other.getQuote()); if (eb.isEquals()) { try { int tableCount1 = getTableCount(); int tableCount2 = other.getTableCount(); eb.append(tableCount1, tableCount2); } catch (Exception e) { // might occur when schemas are disconnected. Omit this // check then. } } return eb.isEquals(); } return false; }