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

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.statement.SQLColumnConstraint;
import com.alibaba.druid.sql.ast.statement.SQLConstraintImpl;
import com.alibaba.druid.sql.dialect.dm.ast.DMSQLObject;
import com.alibaba.druid.sql.dialect.dm.visitor.DmASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class DMIndexTablespacleConstraint extends SQLConstraintImpl implements SQLColumnConstraint, DMSQLObject {
   private SQLExpr tablespacename;
   private Boolean enable;

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

      }
   }

   public DMIndexTablespacleConstraint clone() {
      DMIndexTablespacleConstraint x = new DMIndexTablespacleConstraint();
      super.cloneTo((SQLConstraintImpl)x);
      x.setTablespacename(x.getTablespacename().clone());
      x.setEnable(x.getEnable());
      return x;
   }

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

      visitor.endVisit(this);
   }

   public SQLExpr getTablespacename() {
      return this.tablespacename;
   }

   public void setTablespacename(SQLExpr tablespacename) {
      this.tablespacename = tablespacename;
   }

   public Boolean getEnable() {
      return this.enable;
   }

   public void setEnable(Boolean enable) {
      this.enable = enable;
   }
}
