⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scoreserviceimpl.java

📁 are are are are are are are are are are are are
💻 JAVA
字号:
/* * ScoreServiceImpl.java * * Created on 2006年5月20日, 下午5:22 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package enova.service.impl;import java.util.List;import enova.service.*;import enova.pojo.*;import enova.dao.*;/** * * @author vlinux */public class ScoreServiceImpl implements ScoreService {        private ScoreDao scoreDao;        /** Creates a new instance of ScoreServiceImpl */    public ScoreServiceImpl(ScoreDao scoreDao) {        this.scoreDao = scoreDao;    }        public Score get(Integer studentId, Integer courseId) throws StoreException{        try{            return scoreDao.get(studentId,courseId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*任何人包括管理员,都只能对分数进行修改而不能对其他进行操作*/    public void update(Integer studentId,Integer courseId,Integer grade) throws StoreException{        try{            scoreDao.update(studentId,courseId,grade);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*把该记录记为空*/    public void clean(Integer studentId,Integer courseId) throws StoreException{        try{            scoreDao.clean(studentId,courseId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*把某一个班的学生的某一课程的成绩全部清空*/    public void cleanByClassId(Integer classId,Integer courseId) throws StoreException{        try{            scoreDao.cleanByClassId(classId,courseId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*把某一个班的学生在某一个学年某一个学期的分数全部清空*/    public void cleanByClassIdAndYearAndTerm(Integer classId,Integer year,String term) throws StoreException{        try{            scoreDao.cleanByClassIdAndYearAndTerm(classId,year,term);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过教师ID、课程ID获取该教师所应该输入的所有学生的成绩,按照班级ID和学号排序*/    public List getByTeacherIdAndCourseIdAndClassId(Integer teacherId,Integer courseId,Integer classId) throws StoreException{        try{            return scoreDao.getByTeacherIdAndCourseIdAndClassIdSortNumber(teacherId,courseId,classId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过学生ID、学年、学期获取该学年该学期这位学生的成绩*/    public List getByStudentIdAndYearAndTerm(Integer studentId,Integer year,String term) throws StoreException{        try{            return scoreDao.getByStudentIdAndYearAndTerm(studentId,year,term);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过学生ID获取该学生四年来的所有成绩,按照年级和学期排序*/    public List getByStudentId(Integer studentId) throws StoreException{        try{            return scoreDao.getByStudentIdSortYearAndTerm(studentId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过班级ID获取该班级四年来的所有成绩,按照年级和学期和学号排序*/    public List getByClassId(Integer classId) throws StoreException{        try{            return scoreDao.getByClassIdSortYearAndTermAndNumber(classId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过班级ID、学年、学期获取该学年和学期的该班级的所有成绩,按照学号排序*/    public List getByClassIdAndYearAndTerm(Integer classId,Integer year,String term) throws StoreException{        try{            return scoreDao.getByClassIdAndYearAndTermSortNumber(classId,year,term);        }catch(DataAccessException dae){            throw new StoreException();        }    }            /*通过学生学号、学年、学期获取该学年该学期这位学生的成绩*/    public List getByNumberAndYearAndTerm(String number,Integer year,String term) throws StoreException{        try{            return scoreDao.getByNumberAndYearAndTerm(number,year,term);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过学生学号获取该学生四年来的所有成绩,按照年级和学期排序*/    public List getByNumber(String number) throws StoreException{        try{            return scoreDao.getByNumber(number);        }catch(DataAccessException dae){            throw new StoreException();        }    }        public void updateByTeacherIdAndStudentIdAndCourseId(Integer teacherId,Integer studentId,Integer courseId,Integer value)         throws StoreException{         try{            scoreDao.updateByTeacherIdAndStudentIdAndCourseId(teacherId,studentId,courseId,value);        }catch(DataAccessException dae){            throw new StoreException();        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -