package com.alibaba.druid.sql.ast.statement;

import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLObjectImpl;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class SQLAlterTableRenameColumn extends SQLObjectImpl implements SQLAlterTableItem {
   private SQLName column;
   private SQLName to;

   protected void accept0(SQLASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.column);
         this.acceptChild(visitor, this.to);
      }

      visitor.endVisit(this);
   }

   public SQLName getColumn() {
      return this.column;
   }

   public void setColumn(SQLName column) {
      if (column != null) {
         column.setParent(this);
      }

      this.column = column;
   }

   public SQLName getTo() {
      return this.to;
   }

   public void setTo(SQLName to) {
      if (to != null) {
         to.setParent(this);
      }

      this.to = to;
   }
}
