@Override public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof SetClause)) { return false; } SetClause other = (SetClause) obj; return this.symbol.equals(other.symbol) && this.value.equals(other.value); }
@Override public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof SetClause)) { return false; } SetClause other = (SetClause) obj; return this.symbol.equals(other.symbol) && this.value.equals(other.value); }
@Override public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof SetClause)) { return false; } SetClause other = (SetClause) obj; return this.symbol.equals(other.symbol) && this.value.equals(other.value); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ProjectedColumn)) { return false; } ProjectedColumn other = (ProjectedColumn)obj; return this.symbol.equals(other.symbol) && this.name.equals(other.name) && this.type.equals(other.type); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ProjectedColumn)) { return false; } ProjectedColumn other = (ProjectedColumn)obj; return this.symbol.equals(other.symbol) && this.name.equals(other.name) && this.type.equals(other.type); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ProjectedColumn)) { return false; } ProjectedColumn other = (ProjectedColumn)obj; return this.symbol.equals(other.symbol) && this.name.equals(other.name) && this.type.equals(other.type); }
@Override public Object matchesPkColumn(int pkIndex, Expression ex) { if (rowId != null) { return false; } if (ex instanceof Array) { Array array = (Array)ex; List<Expression> exprs = array.getExpressions(); int toIndex = Math.min(this.getPkLength(), exprs.size()); int[] indexes = new int[toIndex]; for (int i = pkIndex; i < toIndex; i++) { int index = exprs.indexOf(this.columns.get(i)); indexes[i] = index; if (index == -1) { if (i == pkIndex) { return false; } break; } } return indexes; } return columns.get(pkIndex).equals(ex); }
@Override public Object matchesPkColumn(int pkIndex, Expression ex) { if (rowId != null) { return false; } if (ex instanceof Array) { Array array = (Array)ex; List<Expression> exprs = array.getExpressions(); int toIndex = Math.min(this.getPkLength(), exprs.size()); int[] indexes = new int[toIndex]; for (int i = pkIndex; i < toIndex; i++) { int index = exprs.indexOf(this.columns.get(i)); indexes[i] = index; if (index == -1) { if (i == pkIndex) { return false; } break; } } return indexes; } return columns.get(pkIndex).equals(ex); }
@Override public Object matchesPkColumn(int pkIndex, Expression ex) { if (rowId != null) { return false; } if (ex instanceof Array) { Array array = (Array)ex; List<Expression> exprs = array.getExpressions(); int toIndex = Math.min(this.getPkLength(), exprs.size()); int[] indexes = new int[toIndex]; for (int i = pkIndex; i < toIndex; i++) { int index = exprs.indexOf(this.columns.get(i)); indexes[i] = index; if (index == -1) { if (i == pkIndex) { return false; } break; } } return indexes; } return columns.get(pkIndex).equals(ex); }
/** * Compare this constant to another constant for equality. * @param obj Other object * @return True if constants are equal */ public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof Reference)) { return false; } Reference other = (Reference) obj; if (this.positional != other.positional) { return false; } if (this.positional) { return other.getIndex() == getIndex(); } // Compare based on name return this.expression.equals(other.expression); }
/** * Compare this constant to another constant for equality. * @param obj Other object * @return True if constants are equal */ public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof Reference)) { return false; } Reference other = (Reference) obj; if (this.positional != other.positional) { return false; } if (this.positional) { return other.getIndex() == getIndex(); } // Compare based on name return this.expression.equals(other.expression); }
/** * Compare this constant to another constant for equality. * @param obj Other object * @return True if constants are equal */ public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof Reference)) { return false; } Reference other = (Reference) obj; if (this.positional != other.positional) { return false; } if (this.positional) { return other.getIndex() == getIndex(); } // Compare based on name return this.expression.equals(other.expression); }
private void helpEquals(ElementSymbol es1, ElementSymbol es2, boolean equal) { if(equal) { assertTrue("Element symbols should be equal: " + es1 + ", " + es2, es1.equals(es2)); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue("Equal symbols should have same hash code: " + es1 + ", " + es2, es1.hashCode() == es2.hashCode()); //$NON-NLS-1$ //$NON-NLS-2$ } else { assertTrue("Element symbols should not be equal: " + es1 + ", " + es2, ! es1.equals(es2)); //$NON-NLS-1$ //$NON-NLS-2$ } }