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

import java.util.List;

import cn.com.qmth.stmms.biz.exam.model.ExamQuestion;
import cn.com.qmth.stmms.biz.exam.service.query.ExamQuestionSearchQuery;

public interface ExamQuestionService {

    ExamQuestion save(ExamQuestion question);

    void save(List<ExamQuestion> questionList);

    ExamQuestionSearchQuery findByQuery(ExamQuestionSearchQuery query);

    long countByQuery(ExamQuestionSearchQuery query);

    void updateMainTitle(Integer examId, String subjectCode, boolean objective, Integer mainNumber, String mainTitle);

    void deleteByExamAndSubjectAndObjective(Integer examId, String subjectCode, boolean objective);

    void deleteByExamAndSubjectAndObjectiveAndGroupNumber(Integer examId, String subjectCode, boolean objective,
            Integer groupNumber);

    List<ExamQuestion> findByExamAndSubjectAndObjective(Integer examId, String subjectCode, boolean objective);

    List<ExamQuestion> findByExamAndSubjectAndObjectiveAndPaperType(Integer examId, String subjectCode,
            boolean objective, String paperType);

    List<String> getPaperType(int examId, String subjectCode);

    long countByExamAndSubjectAndObjectiveAndMainNumber(Integer examId, String subjectCode, boolean objective,
            Integer mainNumber);

    List<ExamQuestion> findByExamAndSubjectAndObjectiveAndGroupNumber(Integer examId, String subjectCode,
            boolean objective, Integer groupNumber);

    List<ExamQuestion> findByExamAndSubjectAndObjectiveAndMainNumber(Integer examId, String subjectCode,
            boolean objective, Integer mainNumber);

}
