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

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.statement.SQLConstraint;
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKey;
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKeyImpl;
import com.alibaba.druid.sql.ast.statement.SQLTableConstraint;
import com.alibaba.druid.sql.ast.statement.SQLTableElement;
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 DmSQLPrimaryKey extends SQLPrimaryKeyImpl implements SQLConstraint, SQLPrimaryKey, SQLTableElement, SQLTableConstraint, DMSQLObject {
   Boolean not;
   Boolean isNull;
   private SQLExpr tablespacename;

   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.getName());
      }

      visitor.endVisit(this);
   }

   public Boolean getNot() {
      return this.not;
   }

   public void setNot(Boolean not) {
      this.not = not;
   }

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

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

   public Boolean getNull() {
      return this.isNull;
   }

   public void setNull(Boolean aNull) {
      this.isNull = aNull;
   }
}
