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

import com.chenyang.druid.DbType;
import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.SQLStatementImpl;
import com.chenyang.druid.sql.visitor.SQLASTVisitor;
import java.util.ArrayList;
import java.util.List;

public class SQLExportTableStatement extends SQLStatementImpl {
   private SQLExprTableSource table;
   private List<SQLAssignItem> partition = new ArrayList();
   private SQLExpr to;
   private SQLExpr forReplication;

   public SQLExportTableStatement() {
      this.dbType = DbType.hive;
   }

   public SQLExprTableSource getTable() {
      return this.table;
   }

   public void setTable(SQLExprTableSource x) {
      if (x != null) {
         x.setParent(this);
      }

      this.table = x;
   }

   public List<SQLAssignItem> getPartition() {
      return this.partition;
   }

   public SQLExpr getTo() {
      return this.to;
   }

   public void setTo(SQLExpr x) {
      if (x != null) {
         x.setParent(this);
      }

      this.to = x;
   }

   public SQLExpr getForReplication() {
      return this.forReplication;
   }

   public void setForReplication(SQLExpr x) {
      if (x != null) {
         x.setParent(this);
      }

      this.forReplication = x;
   }

   protected void accept0(SQLASTVisitor v) {
      if (v.visit(this)) {
         this.acceptChild(v, this.table);
         this.acceptChild(v, this.partition);
         this.acceptChild(v, this.to);
         this.acceptChild(v, this.forReplication);
      }

      v.endVisit(this);
   }
}
