package cn.com.qmth.stmms.biz.exam.service.query;

import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;

import cn.com.qmth.stmms.biz.common.BaseQuery;
import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
import cn.com.qmth.stmms.common.enums.ExamSubjectStatus;

public class ExamSubjectSearchQuery extends BaseQuery<ExamSubject> {

    private int examId;

    private String code;

    private String level;

    private String category;

    private ExamSubjectStatus status;

    private Double totalScoreNotEqual;

    private Double subjectiveScoreNotEqual;

    private Integer libraryCountGt;

    private Integer libraryCountEqual;

    public int getExamId() {
        return examId;
    }

    public void setExamId(int examId) {
        this.examId = examId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public ExamSubjectStatus getStatus() {
        return status;
    }

    public void setStatus(ExamSubjectStatus status) {
        this.status = status;
    }

    public Double getTotalScoreNotEqual() {
        return totalScoreNotEqual;
    }

    public void setTotalScoreNotEqual(Double totalScoreNotEqual) {
        this.totalScoreNotEqual = totalScoreNotEqual;
    }

    public Double getSubjectiveScoreNotEqual() {
        return subjectiveScoreNotEqual;
    }

    public void setSubjectiveScoreNotEqual(Double subjectiveScoreNotEqual) {
        this.subjectiveScoreNotEqual = subjectiveScoreNotEqual;
    }

    public void orderByLibraryCount(boolean desc) {
        if (desc) {
            setSort(new Sort(Direction.DESC, "libraryCount"));
        } else {
            setSort(new Sort(Direction.ASC, "libraryCount"));
        }
    }

    public Integer getLibraryCountGt() {
        return libraryCountGt;
    }

    public void setLibraryCountGt(Integer libraryCountGt) {
        this.libraryCountGt = libraryCountGt;
    }

    public Integer getLibraryCountEqual() {
        return libraryCountEqual;
    }

    public void setLibraryCountEqual(Integer libraryCountEqual) {
        this.libraryCountEqual = libraryCountEqual;
    }

    public String getLevel() {
        return level;
    }

    public void setLeve(String level) {
        this.level = level;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public void setLevel(String level) {
        this.level = level;
    }
}
