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

import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLObjectImpl;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class SQLAlterTableDropConstraint extends SQLObjectImpl implements SQLAlterTableItem {
   private SQLName constraintName;
   protected boolean cascade = false;
   protected boolean restrict = false;

   public boolean isCascade() {
      return this.cascade;
   }

   public void setCascade(boolean cascade) {
      this.cascade = cascade;
   }

   public boolean isRestrict() {
      return this.restrict;
   }

   public void setRestrict(boolean restrict) {
      this.restrict = restrict;
   }

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

      visitor.endVisit(this);
   }

   public SQLName getConstraintName() {
      return this.constraintName;
   }

   public void setConstraintName(SQLName constraintName) {
      this.constraintName = constraintName;
   }
}
