package com.chenyang.druid.sql.dialect.dm.ast.stmt;

import com.chenyang.druid.sql.ast.SQLName;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableItem;
import com.chenyang.druid.sql.ast.statement.SQLExprTableSource;
import com.chenyang.druid.sql.dialect.dm.ast.DmSQLObjectImpl;
import com.chenyang.druid.sql.dialect.dm.visitor.DmASTVisitor;

public class DmAlterTableExchangePartition extends DmSQLObjectImpl implements SQLAlterTableItem {
   private SQLName name;
   private DmAlterTableModifyPartition.Type type;
   private SQLExprTableSource tableSource;

   public void accept0(DmASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.tableSource);
      }

      visitor.endVisit(this);
   }

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

   public void setName(SQLName name) {
      this.name = name;
   }

   public DmAlterTableModifyPartition.Type getType() {
      return this.type;
   }

   public void setType(DmAlterTableModifyPartition.Type type) {
      this.type = type;
   }

   public SQLExprTableSource getTableSource() {
      return this.tableSource;
   }

   public void setTableSource(SQLExprTableSource tableSource) {
      this.tableSource = tableSource;
   }
}
