package com.alibaba.druid.sql.ast;

import com.alibaba.druid.sql.dialect.oracle.ast.OracleSegmentAttributesImpl;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class SQLSubPartition extends OracleSegmentAttributesImpl {
   protected SQLName name;
   protected SQLPartitionValue values;
   protected SQLName tableSpace;
   protected SQLExpr dataDirectory;
   protected SQLExpr indexDirectory;
   protected SQLExpr maxRows;
   protected SQLExpr minRows;
   protected SQLExpr engine;
   protected SQLExpr comment;

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

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

      this.name = name;
   }

   public SQLPartitionValue getValues() {
      return this.values;
   }

   public void setValues(SQLPartitionValue values) {
      if (values != null) {
         values.setParent(this);
      }

      this.values = values;
   }

   public SQLName getTableSpace() {
      return this.tableSpace;
   }

   public void setTableSpace(SQLName tableSpace) {
      if (tableSpace != null) {
         tableSpace.setParent(this);
      }

      this.tableSpace = tableSpace;
   }

   public SQLExpr getDataDirectory() {
      return this.dataDirectory;
   }

   public void setDataDirectory(SQLExpr dataDirectory) {
      this.dataDirectory = dataDirectory;
   }

   public SQLExpr getIndexDirectory() {
      return this.indexDirectory;
   }

   public void setIndexDirectory(SQLExpr indexDirectory) {
      this.indexDirectory = indexDirectory;
   }

   public SQLExpr getMaxRows() {
      return this.maxRows;
   }

   public void setMaxRows(SQLExpr maxRows) {
      this.maxRows = maxRows;
   }

   public SQLExpr getMinRows() {
      return this.minRows;
   }

   public void setMinRows(SQLExpr minRows) {
      this.minRows = minRows;
   }

   public SQLExpr getEngine() {
      return this.engine;
   }

   public void setEngine(SQLExpr engine) {
      this.engine = engine;
   }

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

   public void setComment(SQLExpr comment) {
      this.comment = comment;
   }

   protected void accept0(SQLASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.name);
         this.acceptChild(visitor, this.tableSpace);
         this.acceptChild(visitor, this.values);
      }

      visitor.endVisit(this);
   }

   public SQLSubPartition clone() {
      SQLSubPartition x = new SQLSubPartition();
      if (this.name != null) {
         x.setName(this.name.clone());
      }

      if (this.values != null) {
         x.setValues(this.values.clone());
      }

      if (this.tableSpace != null) {
         x.setTableSpace(this.tableSpace.clone());
      }

      return x;
   }
}
