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

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

public class ExchangeStrategyExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer offset;

    private Integer limit;

    public ExchangeStrategyExample() {
        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;
        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 ExchangeStrategyExample 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 andStrategyIdIsNull() {
            addCriterion("strategy_id is null");
            return (Criteria) this;
        }

        public Criteria andStrategyIdIsNotNull() {
            addCriterion("strategy_id is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyIdEqualTo(Integer value) {
            addCriterion("strategy_id =", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdNotEqualTo(Integer value) {
            addCriterion("strategy_id <>", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdGreaterThan(Integer value) {
            addCriterion("strategy_id >", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("strategy_id >=", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdLessThan(Integer value) {
            addCriterion("strategy_id <", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdLessThanOrEqualTo(Integer value) {
            addCriterion("strategy_id <=", value, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdIn(List<Integer> values) {
            addCriterion("strategy_id in", values, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdNotIn(List<Integer> values) {
            addCriterion("strategy_id not in", values, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdBetween(Integer value1, Integer value2) {
            addCriterion("strategy_id between", value1, value2, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyIdNotBetween(Integer value1, Integer value2) {
            addCriterion("strategy_id not between", value1, value2, "strategyId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdIsNull() {
            addCriterion("strategy_type_id is null");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdIsNotNull() {
            addCriterion("strategy_type_id is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdEqualTo(Integer value) {
            addCriterion("strategy_type_id =", value, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdNotEqualTo(Integer value) {
            addCriterion("strategy_type_id <>", value, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdGreaterThan(Integer value) {
            addCriterion("strategy_type_id >", value, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("strategy_type_id >=", value, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdLessThan(Integer value) {
            addCriterion("strategy_type_id <", value, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("strategy_type_id <=", value, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdIn(List<Integer> values) {
            addCriterion("strategy_type_id in", values, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdNotIn(List<Integer> values) {
            addCriterion("strategy_type_id not in", values, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("strategy_type_id between", value1, value2, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andStrategyTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("strategy_type_id not between", value1, value2, "strategyTypeId");
            return (Criteria) this;
        }

        public Criteria andCardIdIsNull() {
            addCriterion("card_id is null");
            return (Criteria) this;
        }

        public Criteria andCardIdIsNotNull() {
            addCriterion("card_id is not null");
            return (Criteria) this;
        }

        public Criteria andCardIdEqualTo(Integer value) {
            addCriterion("card_id =", value, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdNotEqualTo(Integer value) {
            addCriterion("card_id <>", value, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdGreaterThan(Integer value) {
            addCriterion("card_id >", value, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("card_id >=", value, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdLessThan(Integer value) {
            addCriterion("card_id <", value, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdLessThanOrEqualTo(Integer value) {
            addCriterion("card_id <=", value, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdIn(List<Integer> values) {
            addCriterion("card_id in", values, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdNotIn(List<Integer> values) {
            addCriterion("card_id not in", values, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdBetween(Integer value1, Integer value2) {
            addCriterion("card_id between", value1, value2, "cardId");
            return (Criteria) this;
        }

        public Criteria andCardIdNotBetween(Integer value1, Integer value2) {
            addCriterion("card_id not between", value1, value2, "cardId");
            return (Criteria) this;
        }

        public Criteria andParamsIsNull() {
            addCriterion("params is null");
            return (Criteria) this;
        }

        public Criteria andParamsIsNotNull() {
            addCriterion("params is not null");
            return (Criteria) this;
        }

        public Criteria andParamsEqualTo(String value) {
            addCriterion("params =", value, "params");
            return (Criteria) this;
        }

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

        public Criteria andParamsGreaterThan(String value) {
            addCriterion("params >", value, "params");
            return (Criteria) this;
        }

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

        public Criteria andParamsLessThan(String value) {
            addCriterion("params <", value, "params");
            return (Criteria) this;
        }

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

        public Criteria andParamsLike(String value) {
            addCriterion("params like", value, "params");
            return (Criteria) this;
        }

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

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

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

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

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

        public Criteria andStrategyCategoryIsNull() {
            addCriterion("strategy_category is null");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryIsNotNull() {
            addCriterion("strategy_category is not null");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryEqualTo(String value) {
            addCriterion("strategy_category =", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryNotEqualTo(String value) {
            addCriterion("strategy_category <>", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryGreaterThan(String value) {
            addCriterion("strategy_category >", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryGreaterThanOrEqualTo(String value) {
            addCriterion("strategy_category >=", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryLessThan(String value) {
            addCriterion("strategy_category <", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryLessThanOrEqualTo(String value) {
            addCriterion("strategy_category <=", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryLike(String value) {
            addCriterion("strategy_category like", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryNotLike(String value) {
            addCriterion("strategy_category not like", value, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryIn(List<String> values) {
            addCriterion("strategy_category in", values, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryNotIn(List<String> values) {
            addCriterion("strategy_category not in", values, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryBetween(String value1, String value2) {
            addCriterion("strategy_category between", value1, value2, "strategyCategory");
            return (Criteria) this;
        }

        public Criteria andStrategyCategoryNotBetween(String value1, String value2) {
            addCriterion("strategy_category not between", value1, value2, "strategyCategory");
            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);
        }
    }
}