package cn.hmsoft.ltc.service.impl;

import java.sql.SQLException;
import java.util.List;

import cn.hmsoft.ltc.dao.CourseQuestionDao;
import cn.hmsoft.ltc.model.CourseQuestion;
import cn.hmsoft.ltc.model.QuestionType;
import cn.hmsoft.ltc.service.iface.CourseQuestionService;

/**
 * 
 * @author zq
 *
 */
public class CourseQuestionServiceImpl implements CourseQuestionService {

	CourseQuestionDao dao = new CourseQuestionDao();
	
	@Override
	public void insertCourseQuestion(CourseQuestion cq) {
		dao.insertCourseQuestion(cq);
	}

	@Override
	public List<CourseQuestion> findCourseQuestion(Integer courseId) throws SQLException {
		return dao.findCourseQuestion(courseId);
	}

	@Override
	public List<CourseQuestion> findCourseQuestionByType(Integer courseId, Integer typeId) throws SQLException {
		return dao.findCourseQuestionByType(courseId, typeId);
	}
	
	@Override
	public List<QuestionType> findQuestionTypeList(Integer courseId) throws SQLException {
		return dao.findQuestionTypeList(courseId);
	}

	
	@Override
	public void deleteCourseQuestion(Integer courseId) {
		dao.deleteCourseQuestion(courseId);
	}

}
