package com.chenyang.druid.sql.dialect.gauss.ast.stmt.alterTable;

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableItem;
import com.chenyang.druid.sql.dialect.gauss.ast.GaussSQLObject;
import com.chenyang.druid.sql.dialect.gauss.ast.GaussSQLObjectImpl;
import com.chenyang.druid.sql.dialect.gauss.visitor.GaussASTVisitor;
import com.chenyang.druid.sql.visitor.SQLASTVisitor;

public class GaussAlterTableInheriteOrNotParentTable extends GaussSQLObjectImpl implements SQLAlterTableItem, GaussSQLObject {
   private boolean inherite = false;
   private SQLExpr parentTable;

   public boolean isInherite() {
      return this.inherite;
   }

   public void setInherite(boolean inherite) {
      this.inherite = inherite;
   }

   public SQLExpr getParentTable() {
      return this.parentTable;
   }

   public void setParentTable(SQLExpr parentTable) {
      this.parentTable = parentTable;
      parentTable.setParent(this);
   }

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

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

      visitor.endVisit(this);
   }

   public GaussAlterTableInheriteOrNotParentTable clone() {
      GaussAlterTableInheriteOrNotParentTable c = new GaussAlterTableInheriteOrNotParentTable();
      c.setParentTable(this.parentTable.clone());
      c.inherite = this.inherite;
      return c;
   }
}
