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

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.SQLStatementImpl;
import com.chenyang.druid.sql.visitor.SQLASTVisitor;

public class SQLShowGrantsStatement extends SQLStatementImpl implements SQLShowStatement {
   protected SQLExpr user;
   protected SQLExpr on;

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

      visitor.endVisit(this);
   }

   public SQLExpr getUser() {
      return this.user;
   }

   public void setUser(SQLExpr user) {
      if (user != null) {
         user.setParent(this);
      }

      this.user = user;
   }

   public SQLExpr getOn() {
      return this.on;
   }

   public void setOn(SQLExpr x) {
      if (x == null) {
         x.setParent(this);
      }

      this.on = x;
   }
}
