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

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLStatementImpl;
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
import com.alibaba.druid.sql.dialect.gauss.visitor.GaussASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class GaussAlterSchemaStatement extends SQLStatementImpl implements GaussSQLStatement, SQLAlterStatement {
   private SQLIdentifierExpr schemaName;
   private SQLIdentifierExpr newName;
   private SQLIdentifierExpr newOwner;
   private boolean with;
   private SQLExpr withValue;

   public boolean isWith() {
      return this.with;
   }

   public void setWith(boolean with) {
      this.with = with;
   }

   public SQLExpr getWithValue() {
      return this.withValue;
   }

   public void setWithValue(SQLExpr withValue) {
      this.withValue = withValue;
   }

   public GaussAlterSchemaStatement() {
      this.dbType = DbType.gauss;
   }

   public SQLIdentifierExpr getSchemaName() {
      return this.schemaName;
   }

   public void setSchemaName(SQLIdentifierExpr schemaName) {
      this.schemaName = schemaName;
   }

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

   public SQLIdentifierExpr getNewName() {
      return this.newName;
   }

   public void setNewName(SQLIdentifierExpr newName) {
      this.newName = newName;
   }

   public SQLIdentifierExpr getNewOwner() {
      return this.newOwner;
   }

   public void setNewOwner(SQLIdentifierExpr newOwner) {
      this.newOwner = newOwner;
   }

   public void accept0(GaussASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.schemaName);
         this.acceptChild(visitor, this.newName);
         this.acceptChild(visitor, this.newOwner);
      }

      visitor.endVisit(this);
   }
}
