/** * Compare two DeclareStatements for equality. They will only evaluate to equal if * they are IDENTICAL: variable and the its type are equal. * @param obj Other object * @return True if equal */ public boolean equals(Object obj) { // Quick same object test if(this == obj) { return true; } // Quick fail tests if(obj == null || !(obj instanceof DeclareStatement) || !super.equals(obj)) { return false; } DeclareStatement other = (DeclareStatement) obj; return EquivalenceUtil.areEqual(getVariableType(), other.getVariableType()); }
/** * Compare two DeclareStatements for equality. They will only evaluate to equal if * they are IDENTICAL: variable and the its type are equal. * @param obj Other object * @return True if equal */ public boolean equals(Object obj) { // Quick same object test if(this == obj) { return true; } // Quick fail tests if(obj == null || !(obj instanceof DeclareStatement) || !super.equals(obj)) { return false; } DeclareStatement other = (DeclareStatement) obj; return EquivalenceUtil.areEqual(getVariableType(), other.getVariableType()); }
/** * Compare two DeclareStatements for equality. They will only evaluate to equal if * they are IDENTICAL: variable and the its type are equal. * @param obj Other object * @return True if equal */ public boolean equals(Object obj) { // Quick same object test if(this == obj) { return true; } // Quick fail tests if(obj == null || !(obj instanceof DeclareStatement) || !super.equals(obj)) { return false; } DeclareStatement other = (DeclareStatement) obj; return EquivalenceUtil.areEqual(getVariableType(), other.getVariableType()); }
/** * Get hashcode for TableAssignmentStatement. WARNING: This hash code relies on the hash codes of the * statements present in the block. If statements are added to the block or if * statements on the block change the hash code will change. Hash code is only valid * after the block has been completely constructed. * @return Hash code */ public int hashCode() { // This hash code relies on the variable and its value for this statement // and criteria clauses, not on the from, order by, or option clauses int myHash = super.hashCode(); myHash = HashCodeUtil.hashCode(myHash, this.getVariableType()); return myHash; }
/** * Get hashcode for TableAssignmentStatement. WARNING: This hash code relies on the hash codes of the * statements present in the block. If statements are added to the block or if * statements on the block change the hash code will change. Hash code is only valid * after the block has been completely constructed. * @return Hash code */ public int hashCode() { // This hash code relies on the variable and its value for this statement // and criteria clauses, not on the from, order by, or option clauses int myHash = super.hashCode(); myHash = HashCodeUtil.hashCode(myHash, this.getVariableType()); return myHash; }
/** * Get hashcode for TableAssignmentStatement. WARNING: This hash code relies on the hash codes of the * statements present in the block. If statements are added to the block or if * statements on the block change the hash code will change. Hash code is only valid * after the block has been completely constructed. * @return Hash code */ public int hashCode() { // This hash code relies on the variable and its value for this statement // and criteria clauses, not on the from, order by, or option clauses int myHash = super.hashCode(); myHash = HashCodeUtil.hashCode(myHash, this.getVariableType()); return myHash; }
@Override public void visit( DeclareStatement obj ) { append(DECLARE); append(SPACE); append(obj.getVariableType()); append(SPACE); createAssignment(obj); }
@Override public void visit( DeclareStatement obj ) { append(DECLARE); append(SPACE); append(obj.getVariableType()); append(SPACE); createAssignment(obj); }
@Override public void visit( DeclareStatement obj ) { append(DECLARE); append(SPACE); append(obj.getVariableType()); append(SPACE); createAssignment(obj); }
public void testGetVariableType() { DeclareStatement s1 = sample1(); assertEquals("Incorrect variable type ", s1.getVariableType(), "String"); //$NON-NLS-1$ //$NON-NLS-2$ }
private void collectDeclareVariable(DeclareStatement obj, GroupSymbol variables, TempMetadataAdapter metadata, GroupContext externalGroups) throws QueryResolverException, TeiidComponentException { ElementSymbol variable = obj.getVariable(); String typeName = obj.getVariableType(); GroupSymbol gs = variable.getGroupSymbol(); if(gs == null) {
private void collectDeclareVariable(DeclareStatement obj, GroupSymbol variables, TempMetadataAdapter metadata, GroupContext externalGroups) throws QueryResolverException, TeiidComponentException { ElementSymbol variable = obj.getVariable(); String typeName = obj.getVariableType(); GroupSymbol gs = variable.getGroupSymbol(); if(gs == null) {
private void collectDeclareVariable(DeclareStatement obj, GroupSymbol variables, TempMetadataAdapter metadata, GroupContext externalGroups) throws QueryResolverException, TeiidComponentException { ElementSymbol variable = obj.getVariable(); String typeName = obj.getVariableType(); GroupSymbol gs = variable.getGroupSymbol(); if(gs == null) {