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

import com.chenyang.druid.sql.ast.SQLName;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableAlterColumn;
import com.chenyang.druid.sql.dialect.dm.ast.DMSQLObject;
import com.chenyang.druid.sql.dialect.dm.visitor.DmASTVisitor;
import com.chenyang.druid.sql.visitor.SQLASTOutputVisitor;
import com.chenyang.druid.sql.visitor.SQLASTVisitor;

public class DmAlterTableAlterColumn extends SQLAlterTableAlterColumn implements DMSQLObject {
   private boolean setNull;
   private boolean setVisible;
   private boolean setNotVisible;
   private SQLName newColumnname;

   protected void accept0(SQLASTVisitor v) {
      if (v instanceof DmASTVisitor) {
         this.accept0((DmASTVisitor)v);
      } else {
         if (v instanceof SQLASTOutputVisitor) {
            ((SQLASTOutputVisitor)v).print(this.toString());
         }

      }
   }

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

      visitor.endVisit(this);
   }

   public boolean isSetNull() {
      return this.setNull;
   }

   public void setSetNull(boolean setNull) {
      this.setNull = setNull;
   }

   public boolean isSetVisible() {
      return this.setVisible;
   }

   public void setSetVisible(boolean setVisible) {
      this.setVisible = setVisible;
   }

   public boolean isSetNotVisible() {
      return this.setNotVisible;
   }

   public void setSetNotVisible(boolean setNotVisible) {
      this.setNotVisible = setNotVisible;
   }

   public SQLName getNewColumnname() {
      return this.newColumnname;
   }

   public void setNewColumnname(SQLName newColumnname) {
      this.newColumnname = newColumnname;
   }
}
