package com.xmomen.module.advice.entity;

import com.xmomen.framework.mybatis.model.BaseMybatisExample;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

// 建议实体类
public class AdviceExample extends BaseMybatisExample {
    // 排序字段
    protected String orderByClause;

    // 是否去重
    protected boolean distinct;

    // 查询条件
    protected List<Criteria> oredCriteria;

    // 构造函数
    public AdviceExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    // 设置排序字段
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    // 获取排序字段
    public String getOrderByClause() {
        return orderByClause;
    }

    // 设置是否去重
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    // 获取是否去重
    public boolean isDistinct() {
        return 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;
    }

    // 生成查询条件
    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));
        }

        // 判断id是否为空
        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        // 判断id是否不为空
        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        // 判断id是否等于某个值
        public Criteria andIdEqualTo(String value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        // 判断id是否不等于某个值
        public Criteria andIdNotEqualTo(String value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        // 判断id是否大于某个值
        public Criteria andIdGreaterThan(String value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        // 判断id是否大于等于某个值
        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        // 判断id是否小于某个值
        public Criteria andIdLessThan(String value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        // 判断id是否小于等于某个值
        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        // 判断id是否包含某个值
        public Criteria andIdLike(String value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        // 判断id是否不包含某个值
        public Criteria andIdNotLike(String value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        // 判断id是否在某个值列表中
        public Criteria andIdIn(List<String> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        // 判断id是否不在某个值列表中
        public Criteria andIdNotIn(List<String> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        // 判断id是否在某个值范围内
        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        // 判断id是否不在某个值范围内
        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        // 判断title是否为空
        public Criteria andTitleIsNull() {
            addCriterion("title is null");
            return (Criteria) this;
        }

        // 判断title是否不为空
        public Criteria andTitleIsNotNull() {
            addCriterion("title is not null");
            return (Criteria) this;
        }

        // 判断title是否等于某个值
        public Criteria andTitleEqualTo(String value) {
            addCriterion("title =", value, "title");
            return (Criteria) this;
        }

        // 判断title是否不等于某个值
        public Criteria andTitleNotEqualTo(String value) {
            addCriterion("title <>", value, "title");
            return (Criteria) this;
        }

        // 判断title是否大于某个值
        public Criteria andTitleGreaterThan(String value) {
            addCriterion("title >", value, "title");
            return (Criteria) this;
        }

        // 判断title是否大于等于某个值
        public Criteria andTitleGreaterThanOrEqualTo(String value) {
            addCriterion("title >=", value, "title");
            return (Criteria) this;
        }

        // 判断title是否小于某个值
        public Criteria andTitleLessThan(String value) {
            addCriterion("title <", value, "title");
            return (Criteria) this;
        }

        // 判断title是否小于等于某个值
        public Criteria andTitleLessThanOrEqualTo(String value) {
            addCriterion("title <=", value, "title");
            return (Criteria) this;
        }

        // 判断title是否包含某个值
        public Criteria andTitleLike(String value) {
            addCriterion("title like", value, "title");
            return (Criteria) this;
        }

        // 判断title是否不包含某个值
        public Criteria andTitleNotLike(String value) {
            addCriterion("title not like", value, "title");
            return (Criteria) this;
        }

        // 判断title是否在某个值列表中
        public Criteria andTitleIn(List<String> values) {
            addCriterion("title in", values, "title");
            return (Criteria) this;
        }

        // 判断title是否不在某个值列表中
        public Criteria andTitleNotIn(List<String> values) {
            addCriterion("title not in", values, "title");
            return (Criteria) this;
        }

        // 判断title是否在某个值范围内
        public Criteria andTitleBetween(String value1, String value2) {
            addCriterion("title between", value1, value2, "title");
            return (Criteria) this;
        }

        // 判断title是否不在某个值范围内
        public Criteria andTitleNotBetween(String value1, String value2) {
            addCriterion("title not between", value1, value2, "title");
            return (Criteria) this;
        }

        // 判断insertDate是否为空
        public Criteria andInsertDateIsNull() {
            addCriterion("insert_date is null");
            return (Criteria) this;
        }

        // 判断insertDate是否不为空
        public Criteria andInsertDateIsNotNull() {
            addCriterion("insert_date is not null");
            return (Criteria) this;
        }

        // 判断insertDate是否等于某个值
        public Criteria andInsertDateEqualTo(Date value) {
            addCriterion("insert_date =", value, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否不等于某个值
        public Criteria andInsertDateNotEqualTo(Date value) {
            addCriterion("insert_date <>", value, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否大于某个值
        public Criteria andInsertDateGreaterThan(Date value) {
            addCriterion("insert_date >", value, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否大于等于某个值
        public Criteria andInsertDateGreaterThanOrEqualTo(Date value) {
            addCriterion("insert_date >=", value, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否小于某个值
        public Criteria andInsertDateLessThan(Date value) {
            addCriterion("insert_date <", value, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否小于等于某个值
        public Criteria andInsertDateLessThanOrEqualTo(Date value) {
            addCriterion("insert_date <=", value, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否在某个值列表中
        public Criteria andInsertDateIn(List<Date> values) {
            addCriterion("insert_date in", values, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否不在某个值列表中
        public Criteria andInsertDateNotIn(List<Date> values) {
            addCriterion("insert_date not in", values, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否在某个值范围内
        public Criteria andInsertDateBetween(Date value1, Date value2) {
            addCriterion("insert_date between", value1, value2, "insertDate");
            return (Criteria) this;
        }

        // 判断insertDate是否不在某个值范围内
        public Criteria andInsertDateNotBetween(Date value1, Date value2) {
            addCriterion("insert_date not between", value1, value2, "insertDate");
            return (Criteria) this;
        }

        // 判断insertUserId是否为空
        public Criteria andInsertUserIdIsNull() {
            addCriterion("insert_user_id is null");
            return (Criteria) this;
        }

        // 判断insertUserId是否不为空
        public Criteria andInsertUserIdIsNotNull() {
            addCriterion("insert_user_id is not null");
            return (Criteria) this;
        }

        // 判断insertUserId是否等于某个值
        public Criteria andInsertUserIdEqualTo(Integer value) {
            addCriterion("insert_user_id =", value, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否不等于某个值
        public Criteria andInsertUserIdNotEqualTo(Integer value) {
            addCriterion("insert_user_id <>", value, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否大于某个值
        public Criteria andInsertUserIdGreaterThan(Integer value) {
            addCriterion("insert_user_id >", value, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否大于等于某个值
        public Criteria andInsertUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("insert_user_id >=", value, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否小于某个值
        public Criteria andInsertUserIdLessThan(Integer value) {
            addCriterion("insert_user_id <", value, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否小于等于某个值
        public Criteria andInsertUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("insert_user_id <=", value, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否在某个值列表中
        public Criteria andInsertUserIdIn(List<Integer> values) {
            addCriterion("insert_user_id in", values, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否不在某个值列表中
        public Criteria andInsertUserIdNotIn(List<Integer> values) {
            addCriterion("insert_user_id not in", values, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否在某个值范围内
        public Criteria andInsertUserIdBetween(Integer value1, Integer value2) {
            addCriterion("insert_user_id between", value1, value2, "insertUserId");
            return (Criteria) this;
        }

        // 判断insertUserId是否不在某个值范围内
        public Criteria andInsertUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("insert_user_id not between", value1, value2, "insertUserId");
            return (Criteria) this;
        }

        // 判断updateDate是否为空
        public Criteria andUpdateDateIsNull() {
            addCriterion("update_date is null");
            return (Criteria) this;
        }

        // 判断updateDate是否不为空
        public Criteria andUpdateDateIsNotNull() {
            addCriterion("update_date is not null");
            return (Criteria) this;
        }

        // 判断updateDate是否等于某个值
        public Criteria andUpdateDateEqualTo(Date value) {
            addCriterion("update_date =", value, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否不等于某个值
        public Criteria andUpdateDateNotEqualTo(Date value) {
            addCriterion("update_date <>", value, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否大于某个值
        public Criteria andUpdateDateGreaterThan(Date value) {
            addCriterion("update_date >", value, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否大于等于某个值
        public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("update_date >=", value, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否小于某个值
        public Criteria andUpdateDateLessThan(Date value) {
            addCriterion("update_date <", value, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否小于等于某个值
        public Criteria andUpdateDateLessThanOrEqualTo(Date value) {
            addCriterion("update_date <=", value, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否在某个值列表中
        public Criteria andUpdateDateIn(List<Date> values) {
            addCriterion("update_date in", values, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否不在某个值列表中
        public Criteria andUpdateDateNotIn(List<Date> values) {
            addCriterion("update_date not in", values, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否在某个值范围内
        public Criteria andUpdateDateBetween(Date value1, Date value2) {
            addCriterion("update_date between", value1, value2, "updateDate");
            return (Criteria) this;
        }

        // 判断updateDate是否不在某个值范围内
        public Criteria andUpdateDateNotBetween(Date value1, Date value2) {
            addCriterion("update_date not between", value1, value2, "updateDate");
            return (Criteria) this;
        }

        // 判断updateUserId是否为空
        public Criteria andUpdateUserIdIsNull() {
            addCriterion("update_user_id is null");
            return (Criteria) this;
        }

        // 判断updateUserId是否不为空
        public Criteria andUpdateUserIdIsNotNull() {
            addCriterion("update_user_id is not null");
            return (Criteria) this;
        }

        // 判断updateUserId是否等于某个值
        public Criteria andUpdateUserIdEqualTo(Integer value) {
            addCriterion("update_user_id =", value, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否不等于某个值
        public Criteria andUpdateUserIdNotEqualTo(Integer value) {
            addCriterion("update_user_id <>", value, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否大于某个值
        public Criteria andUpdateUserIdGreaterThan(Integer value) {
            addCriterion("update_user_id >", value, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否大于等于某个值
        public Criteria andUpdateUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("update_user_id >=", value, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否小于某个值
        public Criteria andUpdateUserIdLessThan(Integer value) {
            addCriterion("update_user_id <", value, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否小于等于某个值
        public Criteria andUpdateUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("update_user_id <=", value, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否在某个值列表中
        public Criteria andUpdateUserIdIn(List<Integer> values) {
            addCriterion("update_user_id in", values, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否不在某个值列表中
        public Criteria andUpdateUserIdNotIn(List<Integer> values) {
            addCriterion("update_user_id not in", values, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否在某个值范围内
        public Criteria andUpdateUserIdBetween(Integer value1, Integer value2) {
            addCriterion("update_user_id between", value1, value2, "updateUserId");
            return (Criteria) this;
        }

        // 判断updateUserId是否不在某个值范围内
        public Criteria andUpdateUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("update_user_id not between", value1, value2, "updateUserId");
            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;

        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;
        }

        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);
        }
    }
}