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

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.statement.SQLConstraint;
import com.chenyang.druid.sql.ast.statement.SQLPrimaryKey;
import com.chenyang.druid.sql.ast.statement.SQLPrimaryKeyImpl;
import com.chenyang.druid.sql.ast.statement.SQLTableConstraint;
import com.chenyang.druid.sql.ast.statement.SQLTableElement;
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 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;
   }
}
