package com.alibaba.druid.sql.dialect.oracle.ast.stmt;

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLObject;
import com.alibaba.druid.sql.ast.SQLPartition;
import com.alibaba.druid.sql.ast.SQLPartitionBy;
import com.alibaba.druid.sql.ast.statement.SQLCreateIndexStatement;
import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
import com.alibaba.druid.sql.dialect.oracle.ast.OracleSegmentAttributes;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
import java.util.ArrayList;
import java.util.List;

public class OracleCreateIndexStatement extends SQLCreateIndexStatement implements OracleDDLStatement, OracleSegmentAttributes, SQLCreateStatement {
   private boolean online = false;
   private boolean indexOnlyTopLevel = false;
   private boolean cluster = false;
   private boolean noParallel;
   private SQLExpr parallel;
   private Integer pctfree;
   private Integer pctused;
   private Integer initrans;
   private Integer maxtrans;
   private Integer pctincrease;
   private Integer freeLists;
   private Boolean compress;
   private Integer compressLevel;
   private boolean compressForOltp;
   private Integer pctthreshold;
   private Boolean logging;
   private Boolean sort;
   private boolean reverse;
   protected SQLName tablespace;
   protected SQLObject storage;
   private Boolean enable = null;
   private boolean computeStatistics = false;
   private boolean local;
   private List<SQLName> localStoreIn = new ArrayList();
   private List<SQLPartition> localPartitions = new ArrayList();
   private boolean global;
   private List<SQLPartitionBy> globalPartitions = new ArrayList();

   public OracleCreateIndexStatement() {
      super(DbType.oracle);
   }

   public SQLExpr getParallel() {
      return this.parallel;
   }

   public void setParallel(SQLExpr parallel) {
      this.parallel = parallel;
   }

   public boolean isNoParallel() {
      return this.noParallel;
   }

   public void setNoParallel(boolean noParallel) {
      this.noParallel = noParallel;
   }

   public boolean isIndexOnlyTopLevel() {
      return this.indexOnlyTopLevel;
   }

   public void setIndexOnlyTopLevel(boolean indexOnlyTopLevel) {
      this.indexOnlyTopLevel = indexOnlyTopLevel;
   }

   public Boolean getSort() {
      return this.sort;
   }

   public void setSort(Boolean sort) {
      this.sort = sort;
   }

   public boolean isReverse() {
      return this.reverse;
   }

   public void setReverse(boolean reverse) {
      this.reverse = reverse;
   }

   protected void accept0(SQLASTVisitor visitor) {
      this.accept0((OracleASTVisitor)visitor);
   }

   public void accept0(OracleASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.getName());
         this.acceptChild(visitor, this.getTable());
         this.acceptChild(visitor, this.getItems());
         this.acceptChild(visitor, this.getTablespace());
         this.acceptChild(visitor, this.parallel);
      }

      visitor.endVisit(this);
   }

   public Boolean getEnable() {
      return this.enable;
   }

   public void setEnable(Boolean enable) {
      this.enable = enable;
   }

   public boolean isComputeStatistics() {
      return this.computeStatistics;
   }

   public void setComputeStatistics(boolean computeStatistics) {
      this.computeStatistics = computeStatistics;
   }

   public boolean isOnline() {
      return this.online;
   }

   public void setOnline(boolean online) {
      this.online = online;
   }

   public boolean isCluster() {
      return this.cluster;
   }

   public void setCluster(boolean cluster) {
      this.cluster = cluster;
   }

   public SQLName getTablespace() {
      return this.tablespace;
   }

   public void setTablespace(SQLName tablespace) {
      if (tablespace != null) {
         tablespace.setParent(this);
      }

      this.tablespace = tablespace;
   }

   public Boolean getCompress() {
      return this.compress;
   }

   public void setCompress(Boolean compress) {
      this.compress = compress;
   }

   public Integer getCompressLevel() {
      return this.compressLevel;
   }

   public void setCompressLevel(Integer compressLevel) {
      this.compressLevel = compressLevel;
   }

   public Integer getPctthreshold() {
      return this.pctthreshold;
   }

   public void setPctthreshold(Integer pctthreshold) {
      this.pctthreshold = pctthreshold;
   }

   public Integer getPctfree() {
      return this.pctfree;
   }

   public void setPctfree(Integer ptcfree) {
      this.pctfree = ptcfree;
   }

   public Integer getPctused() {
      return this.pctused;
   }

   public void setPctused(Integer ptcused) {
      this.pctused = ptcused;
   }

   public Integer getInitrans() {
      return this.initrans;
   }

   public void setInitrans(Integer initrans) {
      this.initrans = initrans;
   }

   public Integer getMaxtrans() {
      return this.maxtrans;
   }

   public void setMaxtrans(Integer maxtrans) {
      this.maxtrans = maxtrans;
   }

   public Integer getPctincrease() {
      return this.pctincrease;
   }

   public void setPctincrease(Integer pctincrease) {
      this.pctincrease = pctincrease;
   }

   public Integer getFreeLists() {
      return this.freeLists;
   }

   public void setFreeLists(Integer freeLists) {
      this.freeLists = freeLists;
   }

   public Boolean getLogging() {
      return this.logging;
   }

   public void setLogging(Boolean logging) {
      this.logging = logging;
   }

   public SQLObject getStorage() {
      return this.storage;
   }

   public void setStorage(SQLObject storage) {
      this.storage = storage;
   }

   public boolean isCompressForOltp() {
      return this.compressForOltp;
   }

   public void setCompressForOltp(boolean compressForOltp) {
      this.compressForOltp = compressForOltp;
   }

   public List<SQLPartition> getLocalPartitions() {
      return this.localPartitions;
   }

   public boolean isLocal() {
      return this.local;
   }

   public void setLocal(boolean local) {
      this.local = local;
   }

   public List<SQLName> getLocalStoreIn() {
      return this.localStoreIn;
   }

   public List<SQLPartitionBy> getGlobalPartitions() {
      return this.globalPartitions;
   }

   public boolean isGlobal() {
      return this.global;
   }

   public void setGlobal(boolean global) {
      this.global = global;
   }
}
