/* Generated By:JJTree: Do not edit this line. Drop.java Version 4.3 */ /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.teiid.query.sql.lang; import java.util.List; import org.teiid.designer.query.sql.lang.IDrop; import org.teiid.designer.runtime.version.spi.ITeiidServerVersion; import org.teiid.query.parser.LanguageVisitor; import org.teiid.query.sql.symbol.Expression; import org.teiid.query.sql.symbol.GroupSymbol; /** * */ public class Drop extends Command implements TargetedCommand, IDrop<Expression, LanguageVisitor> { /** Identifies the table to be dropped. */ private GroupSymbol table; /** * @param p * @param id */ public Drop(ITeiidServerVersion p, int id) { super(p, id); } @Override public int getType() { return TYPE_DROP; } /** * @return the table */ public GroupSymbol getTable() { return table; } @Override public GroupSymbol getGroup() { return table; } /** * @param table the table to set */ public void setTable(GroupSymbol table) { this.table = table; } @Override public List<Expression> getProjectedSymbols() { return getUpdateCommandSymbol(); } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((this.table == null) ? 0 : this.table.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; Drop other = (Drop)obj; if (this.table == null) { if (other.table != null) return false; } else if (!this.table.equals(other.table)) return false; return true; } /** Accept the visitor. **/ @Override public void acceptVisitor(LanguageVisitor visitor) { visitor.visit(this); } @Override public Drop clone() { Drop clone = new Drop(getTeiidVersion(), this.id); if(getTable() != null) clone.setTable(getTable().clone()); if(getSourceHint() != null) clone.setSourceHint(getSourceHint()); if(getOption() != null) clone.setOption(getOption().clone()); copyMetadataState(clone); return clone; } } /* JavaCC - OriginalChecksum=cf112d019f8dc39785f359562092f510 (do not edit this line) */