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

import com.alibaba.druid.sql.ast.SQLObjectImpl;
import com.alibaba.druid.sql.dialect.mysql.ast.MySqlObject;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlExtPartition;
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class SQLAlterTableAddExtPartition extends SQLObjectImpl implements SQLAlterTableItem, MySqlObject {
   private MySqlExtPartition extPartition;

   public void accept0(MySqlASTVisitor visitor) {
      visitor.visit((SQLAlterTableAddExtPartition)this);
      visitor.endVisit((SQLAlterTableAddExtPartition)this);
   }

   protected void accept0(SQLASTVisitor visitor) {
      visitor.visit(this);
      visitor.endVisit(this);
   }

   public void setExPartition(MySqlExtPartition x) {
      if (x != null) {
         x.setParent(this);
      }

      this.extPartition = x;
   }

   public MySqlExtPartition getExtPartition() {
      return this.extPartition;
   }
}
