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

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLStatementImpl;
import com.alibaba.druid.sql.dialect.gauss.visitor.GaussASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class GaussCreateSynonymStatement extends SQLStatementImpl implements GaussSQLStatement {
   private boolean orReplace;
   private SQLName name;
   private boolean forFlag;
   private SQLName object;

   public boolean isForFlag() {
      return this.forFlag;
   }

   public void setForFlag(boolean forFlag) {
      this.forFlag = forFlag;
   }

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

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

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

   public SQLName getName() {
      return this.name;
   }

   public void setName(SQLName name) {
      if (name != null) {
         name.setParent(this);
      }

      this.name = name;
   }

   public SQLName getObject() {
      return this.object;
   }

   public void setObject(SQLName object) {
      if (object != null) {
         object.setParent(this);
      }

      this.object = object;
   }

   public boolean isOrReplace() {
      return this.orReplace;
   }

   public void setOrReplace(boolean orReplace) {
      this.orReplace = orReplace;
   }
}
