package com.alibaba.druid.sql.dialect.postgresql.ast;

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLPartition;
import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
import com.alibaba.druid.sql.dialect.greenplum.visitor.GPASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
import java.util.ArrayList;
import java.util.List;

public class PGSQLPartition extends SQLPartition {
   private SQLName name;
   private boolean ifDefault;
   private ArrayList<SQLExpr> valueList = new ArrayList();
   private boolean start;
   private boolean startInclusive;
   private boolean startExclusive;
   private boolean end;
   private boolean endInclusive;
   private boolean endExclusive;
   private boolean every;
   private boolean everyInterval;
   protected SQLExpr startValue;
   protected SQLExpr startDataType;
   protected SQLExpr endValue;
   protected SQLExpr endDataType;
   protected SQLExpr everyValue;
   protected SQLExpr everyDataType;
   private boolean with;
   private List<SQLUpdateSetItem> withList = new ArrayList();
   private List<SQLExpr> columnStorageDirectiveList = new ArrayList();
   private SQLName tableSpace;
   private boolean subPartition;

   public SQLExpr getStartDataType() {
      return this.startDataType;
   }

   public void setStartDataType(SQLExpr startDataType) {
      this.startDataType = startDataType;
   }

   public SQLExpr getEndDataType() {
      return this.endDataType;
   }

   public void setEndDataType(SQLExpr endDataType) {
      this.endDataType = endDataType;
   }

   public SQLExpr getEveryDataType() {
      return this.everyDataType;
   }

   public void setEveryDataType(SQLExpr everyDataType) {
      this.everyDataType = everyDataType;
   }

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

   public void setName(SQLName name) {
      this.name = name;
   }

   public boolean isIfDefault() {
      return this.ifDefault;
   }

   public void setIfDefault(boolean ifDefault) {
      this.ifDefault = ifDefault;
   }

   public ArrayList<SQLExpr> getValueList() {
      return this.valueList;
   }

   public void setValueList(ArrayList<SQLExpr> valueList) {
      this.valueList = valueList;
   }

   public boolean isStart() {
      return this.start;
   }

   public void setStart(boolean start) {
      this.start = start;
   }

   public boolean isStartInclusive() {
      return this.startInclusive;
   }

   public void setStartInclusive(boolean startInclusive) {
      this.startInclusive = startInclusive;
   }

   public boolean isStartExclusive() {
      return this.startExclusive;
   }

   public void setStartExclusive(boolean startExclusive) {
      this.startExclusive = startExclusive;
   }

   public boolean isEnd() {
      return this.end;
   }

   public void setEnd(boolean end) {
      this.end = end;
   }

   public boolean isEndInclusive() {
      return this.endInclusive;
   }

   public void setEndInclusive(boolean endInclusive) {
      this.endInclusive = endInclusive;
   }

   public boolean isEndExclusive() {
      return this.endExclusive;
   }

   public void setEndExclusive(boolean endExclusive) {
      this.endExclusive = endExclusive;
   }

   public boolean isEvery() {
      return this.every;
   }

   public void setEvery(boolean every) {
      this.every = every;
   }

   public boolean isEveryInterval() {
      return this.everyInterval;
   }

   public void setEveryInterval(boolean everyInterval) {
      this.everyInterval = everyInterval;
   }

   public SQLExpr getStartValue() {
      return this.startValue;
   }

   public void setStartValue(SQLExpr startValue) {
      this.startValue = startValue;
   }

   public SQLExpr getEndValue() {
      return this.endValue;
   }

   public void setEndValue(SQLExpr endValue) {
      this.endValue = endValue;
   }

   public SQLExpr getEveryValue() {
      return this.everyValue;
   }

   public void setEveryValue(SQLExpr everyValue) {
      this.everyValue = everyValue;
   }

   public boolean isWith() {
      return this.with;
   }

   public void setWith(boolean with) {
      this.with = with;
   }

   public List<SQLUpdateSetItem> getWithList() {
      return this.withList;
   }

   public void setWithList(List<SQLUpdateSetItem> withList) {
      this.withList = withList;
   }

   public List<SQLExpr> getColumnStorageDirectiveList() {
      return this.columnStorageDirectiveList;
   }

   public void setColumnStorageDirectiveList(List<SQLExpr> columnStorageDirectiveList) {
      this.columnStorageDirectiveList = columnStorageDirectiveList;
   }

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

   public void setTableSpace(SQLName tableSpace) {
      this.tableSpace = tableSpace;
   }

   public boolean isSubPartition() {
      return this.subPartition;
   }

   public void setSubPartition(boolean subPartition) {
      this.subPartition = subPartition;
   }

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

   public void accept0(GPASTVisitor visitor) {
      visitor.visit((SQLPartition)this);
   }

   public String toString() {
      return SQLUtils.toSQLString(this, (DbType)DbType.postgresql);
   }
}
