package com.neusoft.smart.pos.org.persistent.domain;

import java.util.ArrayList;
import java.util.List;

public class CityRegionDictionaryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer offset;

    private Integer limit;

    public CityRegionDictionaryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        this.offset = null;
        this.limit = null;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getLimit() {
        return this.limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public CityRegionDictionaryExample page(int offset, int limit) {
        this.offset = offset;
        this.limit = limit;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andTransactionIdIsNull() {
            addCriterion("transaction_id is null");
            return (Criteria) this;
        }

        public Criteria andTransactionIdIsNotNull() {
            addCriterion("Transaction_id is not null");
            return (Criteria) this;
        }

        public Criteria andTransactionIdEqualTo(Integer value) {
            addCriterion("Transaction_id =", value, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdNotEqualTo(Integer value) {
            addCriterion("Transaction_id <>", value, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdGreaterThan(Integer value) {
            addCriterion("Transaction_id >", value, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("Transaction_id >=", value, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdLessThan(Integer value) {
            addCriterion("Transaction_id <", value, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdLessThanOrEqualTo(Integer value) {
            addCriterion("Transaction_id <=", value, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdIn(List<Integer> values) {
            addCriterion("Transaction_id in", values, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdNotIn(List<Integer> values) {
            addCriterion("Transaction_id not in", values, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdBetween(Integer value1, Integer value2) {
            addCriterion("Transaction_id between", value1, value2, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andTransactionIdNotBetween(Integer value1, Integer value2) {
            addCriterion("Transaction_id not between", value1, value2, "Transaction_id");
            return (Criteria) this;
        }

        public Criteria andRegionNumberIsNull() {
            addCriterion("Region_number is null");
            return (Criteria) this;
        }

        public Criteria andRegionNumberIsNotNull() {
            addCriterion("Region_number is not null");
            return (Criteria) this;
        }

        public Criteria andRegionNumberEqualTo(Integer value) {
            addCriterion("Region_number =", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberNotEqualTo(Integer value) {
            addCriterion("Region_number <>", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberGreaterThan(Integer value) {
            addCriterion("Region_number >", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("Region_number >=", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberLessThan(Integer value) {
            addCriterion("Region_number <", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberLessThanOrEqualTo(Integer value) {
            addCriterion("Region_number <=", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberLike(Integer value) {
            addCriterion("Region_number like", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberNotLike(Integer value) {
            addCriterion("Region_number not like", value, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberIn(List<Integer> values) {
            addCriterion("Region_number in", values, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberNotIn(List<Integer> values) {
            addCriterion("Region_number not in", values, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberBetween(Integer value1, Integer value2) {
            addCriterion("Region_number between", value1, value2, "Region_number");
            return (Criteria) this;
        }

        public Criteria andRegionNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("Region_number not between", value1, value2, "Region_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberIsNull() {
            addCriterion("Parent_number is null");
            return (Criteria) this;
        }

        public Criteria andParentNumberIsNotNull() {
            addCriterion("Parent_number is not null");
            return (Criteria) this;
        }

        public Criteria andParentNumberEqualTo(Integer value) {
            addCriterion("Parent_number =", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberNotEqualTo(Integer value) {
            addCriterion("Parent_number <>", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberGreaterThan(Integer value) {
            addCriterion("Parent_number >", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("Parent_number >=", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberLessThan(Integer value) {
            addCriterion("Parent_number <", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberLessThanOrEqualTo(Integer value) {
            addCriterion("Parent_number <=", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberLike(Integer value) {
            addCriterion("Parent_number like", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberNotLike(Integer value) {
            addCriterion("Parent_number not like", value, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberIn(List<Integer> values) {
            addCriterion("Parent_number in", values, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberNotIn(List<Integer> values) {
            addCriterion("Parent_number not in", values, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberBetween(Integer value1, Integer value2) {
            addCriterion("Parent_number between", value1, value2, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andParentNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("Parent_number not between", value1, value2, "Parent_number");
            return (Criteria) this;
        }

        public Criteria andRegionNameIsNull() {
            addCriterion("Region_name is null");
            return (Criteria) this;
        }

        public Criteria andRegionNameIsNotNull() {
            addCriterion("Region_name is not null");
            return (Criteria) this;
        }

        public Criteria andRegionNameEqualTo(String value) {
            addCriterion("Region_name =", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameNotEqualTo(String value) {
            addCriterion("Region_name <>", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameGreaterThan(String value) {
            addCriterion("Region_name >", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameGreaterThanOrEqualTo(String value) {
            addCriterion("Region_name >=", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameLessThan(String value) {
            addCriterion("Region_name <", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameLessThanOrEqualTo(String value) {
            addCriterion("Region_name <=", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameLike(String value) {
            addCriterion("Region_name like", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameNotLike(String value) {
            addCriterion("Region_name not like", value, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameIn(List<String> values) {
            addCriterion("Region_name in", values, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameNotIn(List<String> values) {
            addCriterion("Region_name not in", values, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameBetween(String value1, String value2) {
            addCriterion("Region_name between", value1, value2, "Region_name");
            return (Criteria) this;
        }

        public Criteria andRegionNameNotBetween(String value1, String value2) {
            addCriterion("Region_name not between", value1, value2, "Region_name");
            return (Criteria) this;
        }

        public Criteria andShortNameIsNull() {
            addCriterion("Short_name is null");
            return (Criteria) this;
        }

        public Criteria andShortNameIsNotNull() {
            addCriterion("Short_name is not null");
            return (Criteria) this;
        }

        public Criteria andShortNameEqualTo(String value) {
            addCriterion("Short_name =", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameNotEqualTo(String value) {
            addCriterion("Short_name <>", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameGreaterThan(String value) {
            addCriterion("Short_name >", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameGreaterThanOrEqualTo(String value) {
            addCriterion("Short_name >=", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameLessThan(String value) {
            addCriterion("Short_name <", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameLessThanOrEqualTo(String value) {
            addCriterion("Short_name <=", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameLike(String value) {
            addCriterion("Short_name like", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameNotLike(String value) {
            addCriterion("Short_name not like", value, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameIn(List<String> values) {
            addCriterion("Short_name in", values, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameNotIn(List<String> values) {
            addCriterion("Short_name not in", values, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameBetween(String value1, String value2) {
            addCriterion("Short_name between", value1, value2, "Short_name");
            return (Criteria) this;
        }

        public Criteria andShortNameNotBetween(String value1, String value2) {
            addCriterion("Short_name not between", value1, value2, "Short_name");
            return (Criteria) this;
        }
        
        public Criteria andLevelIsNull() {
            addCriterion("Level is null");
            return (Criteria) this;
        }

        public Criteria andLevelIsNotNull() {
            addCriterion("Level is not null");
            return (Criteria) this;
        }

        public Criteria andLevelEqualTo(Integer value) {
            addCriterion("Level =", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelNotEqualTo(Integer value) {
            addCriterion("Level <>", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelGreaterThan(Integer value) {
            addCriterion("Level >", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("Level >=", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelLessThan(Integer value) {
            addCriterion("Level <", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelLessThanOrEqualTo(Integer value) {
            addCriterion("Level <=", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelLike(Integer value) {
            addCriterion("Level like", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelNotLike(Integer value) {
            addCriterion("Level not like", value, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelIn(List<Integer> values) {
            addCriterion("Level in", values, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelNotIn(List<Integer> values) {
            addCriterion("Level not in", values, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelBetween(Integer value1, Integer value2) {
            addCriterion("Level between", value1, value2, "Level");
            return (Criteria) this;
        }

        public Criteria andLevelNotBetween(Integer value1, Integer value2) {
            addCriterion("Level not between", value1, value2, "Level");
            return (Criteria) this;
        }

        public Criteria andIsEnableIsNull() {
            addCriterion("Is_enable is null");
            return (Criteria) this;
        }

        public Criteria andIsEnableIsNotNull() {
            addCriterion("Is_enable is not null");
            return (Criteria) this;
        }

        public Criteria andIsEnableEqualTo(Integer value) {
            addCriterion("Is_enable =", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotEqualTo(Integer value) {
            addCriterion("Is_enable <>", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableGreaterThan(Integer value) {
            addCriterion("Is_enable >", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableGreaterThanOrEqualTo(Integer value) {
            addCriterion("Is_enable >=", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableLessThan(Integer value) {
            addCriterion("Is_enable <", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableLessThanOrEqualTo(Integer value) {
            addCriterion("Is_enable <=", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableLike(Integer value) {
            addCriterion("Is_enable like", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotLike(Integer value) {
            addCriterion("Is_enable not like", value, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableIn(List<Integer> values) {
            addCriterion("Is_enable in", values, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotIn(List<Integer> values) {
            addCriterion("Is_enable not in", values, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableBetween(Integer value1, Integer value2) {
            addCriterion("Is_enable between", value1, value2, "Is_enable");
            return (Criteria) this;
        }

        public Criteria andIsEnableNotBetween(Integer value1, Integer value2) {
            addCriterion("Is_enable not between", value1, value2, "Is_enable");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }
    }
}