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

import com.alibaba.druid.sql.ast.SQLObject;
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 DmAlterTableModifyConstraint extends DmSQLObjectImpl implements SQLAlterTableItem {
   private SQLConstraint constraint;
   private Boolean cascade;
   private Boolean restrict;
   private Boolean check;
   protected SQLObject externalTableFilePath;

   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 getCascade() {
      return this.cascade;
   }

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

   public Boolean getRestrict() {
      return this.restrict;
   }

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

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

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

   public SQLObject getExternalTableFilePath() {
      return this.externalTableFilePath;
   }

   public void setExternalTableFilePath(SQLObject externalTableFilePath) {
      this.externalTableFilePath = externalTableFilePath;
   }
}
