package cn.com.qmth.stmms.biz.mark.query;

import java.util.HashSet;
import java.util.Set;

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.mark.model.MarkLibrary;
import cn.com.qmth.stmms.common.enums.LibraryStatus;

public class MarkLibrarySearchQuery extends BaseQuery<MarkLibrary> {

    private int examId;

    private String subjectCode;

    private int campusId;

    private Integer studentId;

    private String examNumber;

    private Set<LibraryStatus> statusSet;

    private int markerId;

    private int tagId;

    private Boolean tagNotNull;

    private int groupNumber;

    private Double markerScore;

    public MarkLibrarySearchQuery() {
        super();
        this.statusSet = new HashSet<>();
    }

    public void orderByMarkerTimeDesc() {
        setSort(new Sort(Direction.DESC, "markerTime"));
    }

    public void orderByExamNumber() {
        setSort(new Sort(Direction.ASC, "examNumber"));
    }

    public void orderById() {
        setSort(new Sort(Direction.ASC, "id"));
    }

    public int getExamId() {
        return examId;
    }

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

    public String getSubjectCode() {
        return subjectCode;
    }

    public void setSubjectCode(String subjectCode) {
        this.subjectCode = subjectCode;
    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public String getExamNumber() {
        return examNumber;
    }

    public void setExamNumber(String examNumber) {
        this.examNumber = examNumber;
    }

    public int getMarkerId() {
        return markerId;
    }

    public void setMarkerId(int markerId) {
        this.markerId = markerId;
    }

    public int getTagId() {
        return tagId;
    }

    public void setTagId(int tagId) {
        this.tagId = tagId;
    }

    public Boolean getTagNotNull() {
        return tagNotNull;
    }

    public void setTagNotNull(Boolean tagNotNull) {
        this.tagNotNull = tagNotNull;
    }

    public int getCampusId() {
        return campusId;
    }

    public void setCampusId(int campusId) {
        this.campusId = campusId;
    }

    public int getGroupNumber() {
        return groupNumber;
    }

    public void setGroupNumber(int groupNumber) {
        this.groupNumber = groupNumber;
    }

    public Set<LibraryStatus> getStatusSet() {
        return statusSet;
    }

    public void clearStatus() {
        this.statusSet.clear();
    }

    public void addStatus(LibraryStatus status) {
        this.statusSet.add(status);
    }

    public Double getMarkerScore() {
        return markerScore;
    }

    public void setMarkerScore(Double markerScore) {
        this.markerScore = markerScore;
    }

}
