package com.alibaba.druid.sql.dialect.gauss.ast.stmt.alterTable;

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.statement.SQLAlterTableItem;
import com.alibaba.druid.sql.dialect.gauss.ast.GaussSQLObject;
import com.alibaba.druid.sql.dialect.gauss.ast.GaussSQLObjectImpl;
import com.alibaba.druid.sql.dialect.gauss.visitor.GaussASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class GaussAlterTableValidateConstraint extends GaussSQLObjectImpl implements SQLAlterTableItem, GaussSQLObject {
   private SQLExpr constraint;

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

   public void setConstraint(SQLExpr constraint) {
      this.constraint = constraint;
      constraint.setParent(this);
   }

   public void accept0(SQLASTVisitor visitor) {
      this.accept0((GaussASTVisitor)visitor);
   }

   public void accept0(GaussASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.constraint.accept(visitor);
      }

      visitor.endVisit(this);
   }

   public GaussAlterTableValidateConstraint clone() {
      GaussAlterTableValidateConstraint c = new GaussAlterTableValidateConstraint();
      c.setConstraint(this.constraint.clone());
      return c;
   }
}
