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

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

public class SQLAlterViewRenameStatement extends SQLStatementImpl implements SQLAlterStatement {
   private SQLName name;
   private SQLName to;

   public SQLName getName() {
      return this.name;
   }

   public void setName(SQLName name) {
      if (name != null) {
         name.setParent(this);
      }

      this.name = name;
   }

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

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

      this.to = to;
   }

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

      visitor.endVisit(this);
   }
}
