@Override public boolean equals(Object o) { if (o == this) return true; if( ! (o instanceof Ranking)) return false; Ranking other = (Ranking) o; if ( ! QueryHelper.equals(rankProperties, other.rankProperties)) return false; if ( ! QueryHelper.equals(rankFeatures, other.rankFeatures)) return false; if ( ! QueryHelper.equals(freshness, other.freshness)) return false; if ( ! QueryHelper.equals(this.sorting, other.sorting)) return false; if ( ! QueryHelper.equals(this.location, other.location)) return false; if ( ! QueryHelper.equals(this.profile, other.profile)) return false; return true; }
public boolean equals(Object o) { if ( ! (o instanceof Model)) return false; Model other = (Model) o; if ( ! ( QueryHelper.equals(other.encoding, this.encoding) && QueryHelper.equals(other.language, this.language) && QueryHelper.equals(other.searchPath, this.searchPath) && QueryHelper.equals(other.sources, this.sources) && QueryHelper.equals(other.restrict, this.restrict) && QueryHelper.equals(other.defaultIndex, this.defaultIndex) && QueryHelper.equals(other.type, this.type) )) return false; if (other.queryTree == null && this.queryTree == null) // don't cause query parsing return QueryHelper.equals(other.queryString, this.queryString) && QueryHelper.equals(other.filter, this.filter); else // make sure we compare a parsed variant of both return QueryHelper.equals(other.getQueryTree(), this.getQueryTree()); }