package com.alibaba.druid.sql.dialect.db2.ast.stmt.alterTable;

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.statement.SQLAlterTableItem;
import com.alibaba.druid.sql.dialect.db2.ast.DB2SQLObjectImpl;
import com.alibaba.druid.sql.dialect.db2.visitor.DB2ASTVisitor;

public class DB2AlterTableRenameTo extends DB2SQLObjectImpl implements SQLAlterTableItem {
   private SQLExpr to;

   public void accept0(DB2ASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.to);
      }

      visitor.endVisit(this);
   }

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

   public void setTo(SQLExpr to) {
      to.setParent(this);
      this.to = to;
   }

   public DB2AlterTableRenameTo clone() {
      DB2AlterTableRenameTo c = new DB2AlterTableRenameTo();
      c.setTo(this.to.clone());
      return c;
   }
}
