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

import com.alibaba.druid.sql.ast.statement.SQLAlterTableItem;
import com.alibaba.druid.sql.ast.statement.SQLConstraint;
import com.alibaba.druid.sql.dialect.dm.ast.DmSQLObjectImpl;
import com.alibaba.druid.sql.dialect.dm.visitor.DmASTVisitor;

public class DmAlterTableAddConstraint extends DmSQLObjectImpl implements SQLAlterTableItem {
   private SQLConstraint constraint;
   private Boolean check;
   private Boolean enable;

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

      visitor.endVisit(this);
   }

   public SQLConstraint getConstraint() {
      return this.constraint;
   }

   public void setConstraint(SQLConstraint constraint) {
      if (constraint != null) {
         constraint.setParent(this);
      }

      this.constraint = constraint;
   }

   public Boolean getCheck() {
      return this.check;
   }

   public void setCheck(Boolean check) {
      this.check = check;
   }

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

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