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

import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLObject;
import com.alibaba.druid.sql.ast.SQLStatementImpl;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
import java.util.Collections;
import java.util.List;

public class SQLAlterTypeStatement extends SQLStatementImpl {
   private SQLName name;
   private boolean compile;
   private boolean debug;
   private boolean body;
   private boolean reuseSettings;

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

   public void setName(SQLName name) {
      if (name != null) {
         name.setParent(this);
      }

      this.name = name;
   }

   public boolean isCompile() {
      return this.compile;
   }

   public void setCompile(boolean compile) {
      this.compile = compile;
   }

   public boolean isDebug() {
      return this.debug;
   }

   public void setDebug(boolean debug) {
      this.debug = debug;
   }

   public boolean isBody() {
      return this.body;
   }

   public void setBody(boolean body) {
      this.body = body;
   }

   public boolean isReuseSettings() {
      return this.reuseSettings;
   }

   public void setReuseSettings(boolean reuseSettings) {
      this.reuseSettings = reuseSettings;
   }

   protected void accept0(SQLASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.name);
      }

      visitor.endVisit(this);
   }

   public List<SQLObject> getChildren() {
      return Collections.singletonList(this.name);
   }
}
