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

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
import com.alibaba.druid.sql.dialect.mariadb.visitor.MariadbASTVisitor;
import java.util.HashMap;
import java.util.Map;

public class MariadbCreateExternalCatalogStatement extends MariadbStatementImpl implements SQLAlterStatement {
   private SQLName name;
   private boolean ifNotExists;
   private Map<SQLName, SQLName> properties = new HashMap();
   private SQLName comment;

   public MariadbCreateExternalCatalogStatement() {
      this.setDbType(DbType.mariadb);
   }

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

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

      this.name = name;
   }

   public SQLName getComment() {
      return this.comment;
   }

   public void setComment(SQLName comment) {
      if (comment != null) {
         comment.setParent(this);
      }

      this.comment = comment;
   }

   public Map<SQLName, SQLName> getProperties() {
      return this.properties;
   }

   public boolean isIfNotExists() {
      return this.ifNotExists;
   }

   public void setIfNotExists(boolean ifNotExists) {
      this.ifNotExists = ifNotExists;
   }

   public void accept0(MariadbASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.name);
         this.acceptChild(visitor, this.comment);
      }

      visitor.endVisit(this);
   }
}
