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

import com.chenyang.druid.sql.ast.SQLObjectImpl;
import com.chenyang.druid.sql.dialect.mysql.ast.MySqlObject;
import com.chenyang.druid.sql.dialect.mysql.ast.statement.MySqlExtPartition;
import com.chenyang.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
import com.chenyang.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;
   }
}
