/* Generated By:JJTree: Do not edit this line. JoinType.java Version 4.3 */ /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=,NODE_EXTENDS=,NODE_FACTORY=TeiidNodeFactory,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.teiid.query.sql.lang; import org.teiid.designer.query.sql.lang.IJoinType; import org.teiid.designer.runtime.version.spi.ITeiidServerVersion; import org.teiid.query.parser.LanguageVisitor; /** * */ public class JoinType extends SimpleNode implements IJoinType<LanguageVisitor>{ private Types kind = Types.JOIN_CROSS; /** * @param p * @param id */ public JoinType(ITeiidServerVersion p, int id) { super(p, id); } /** * @return the kind */ public Types getKind() { return kind; } /** * @param kind the kind to set */ public void setKind(Types kind) { this.kind = kind; } /** * Used only for comparison during equals, not by users of this class * @return Type code for object */ @Override public int getTypeCode() { return kind.getTypeCode(); } /** * Check if this join type is an outer join. * @return True if left/right/full outer, false if inner/cross */ @Override public boolean isOuter() { return kind.isOuter(); } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((this.kind == null) ? 0 : this.kind.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; JoinType other = (JoinType)obj; if (this.kind != other.kind) return false; return true; } /** Accept the visitor. **/ @Override public void acceptVisitor(LanguageVisitor visitor) { visitor.visit(this); } @Override public JoinType clone() { JoinType clone = new JoinType(getTeiidVersion(), this.id); if(getKind() != null) clone.setKind(getKind()); return clone; } } /* JavaCC - OriginalChecksum=682a038ace51527d7a11065b4087303a (do not edit this line) */