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

import com.chenyang.druid.sql.visitor.SQLASTVisitor;

public class SQLPrimaryKeyImpl extends SQLUnique implements SQLPrimaryKey, SQLTableConstraint {
   protected boolean disableNovalidate = false;
   protected boolean clustered = false;

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

      visitor.endVisit(this);
   }

   public SQLPrimaryKeyImpl clone() {
      SQLPrimaryKeyImpl x = new SQLPrimaryKeyImpl();
      this.cloneTo(x);
      return x;
   }

   public void cloneTo(SQLPrimaryKeyImpl x) {
      super.cloneTo(x);
      x.disableNovalidate = this.disableNovalidate;
      x.clustered = this.clustered;
   }

   public boolean isDisableNovalidate() {
      return this.disableNovalidate;
   }

   public void setDisableNovalidate(boolean disableNovalidate) {
      this.disableNovalidate = disableNovalidate;
   }

   public boolean isClustered() {
      return this.clustered;
   }

   public void setClustered(boolean clustered) {
      this.clustered = clustered;
   }
}
