package com.alibaba.druid.sql.dialect.db2.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.db2.visitor.DB2ASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class DB2CreateSynonymStatement extends SQLStatementImpl implements DB2SQLStatement {
   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 DB2CreateSynonymStatement() {
      this.dbType = DbType.db2;
   }

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

   public void accept0(DB2ASTVisitor 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;
   }
}
