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

import com.chenyang.druid.sql.ast.SQLName;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableItem;
import com.chenyang.druid.sql.ast.statement.SQLColumnDefinition;
import com.chenyang.druid.sql.dialect.mariadb.ast.MariadbObjectImpl;
import com.chenyang.druid.sql.dialect.mariadb.visitor.MariadbASTVisitor;

public class MariadbAlterTableModifyColumn extends MariadbObjectImpl implements SQLAlterTableItem {
   private SQLColumnDefinition newColumnDefinition;
   private boolean first;
   private SQLName firstColumn;
   private SQLName afterColumn;

   public void accept0(MariadbASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.newColumnDefinition);
         this.acceptChild(visitor, this.firstColumn);
         this.acceptChild(visitor, this.afterColumn);
      }

   }

   public SQLName getFirstColumn() {
      return this.firstColumn;
   }

   public void setFirstColumn(SQLName firstColumn) {
      this.firstColumn = firstColumn;
   }

   public SQLName getAfterColumn() {
      return this.afterColumn;
   }

   public void setAfterColumn(SQLName afterColumn) {
      this.afterColumn = afterColumn;
   }

   public SQLColumnDefinition getNewColumnDefinition() {
      return this.newColumnDefinition;
   }

   public void setNewColumnDefinition(SQLColumnDefinition newColumnDefinition) {
      this.newColumnDefinition = newColumnDefinition;
   }

   public boolean isFirst() {
      return this.first;
   }

   public void setFirst(boolean first) {
      this.first = first;
   }
}
