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

import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLStatementImpl;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class SQLCreateUserStatement extends SQLStatementImpl {
   private SQLName user;
   private SQLExpr password;
   private SQLName defaultTableSpace;

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

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

      this.user = user;
   }

   public SQLExpr getPassword() {
      return this.password;
   }

   public void setPassword(SQLExpr password) {
      if (password != null) {
         password.setParent(this);
      }

      this.password = password;
   }

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

      visitor.endVisit(this);
   }

   public SQLName getDefaultTableSpace() {
      return this.defaultTableSpace;
   }

   public void setDefaultTableSpace(SQLName defaultTableSpace) {
      this.defaultTableSpace = defaultTableSpace;
   }
}
