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

📄 classserviceimpl.java

📁 are are are are are are are are are are are are
💻 JAVA
字号:
/* * ClassServiceImpl.java * * Created on 2006年5月19日, 下午8:32 * * 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 ClassServiceImpl implements ClassService {        private ClassDao classDao;        /** Creates a new instance of ClassServiceImpl */    public ClassServiceImpl(ClassDao classDao) {        this.classDao = classDao;    }        /*通过班级ID获取班级*/    public enova.pojo.Class get(Integer classId) throws StoreException{        try{            return classDao.get(classId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*更新或创建一个班级,如果班级名称和所在专业的组合已经存在,则抛出存在异常*/    public void updateOrCreate(enova.pojo.Class c) throws UniqueException, StoreException{        try{            classDao.updateOrInsert(c);        }catch(DataAccessException dae){            throw new StoreException();        }catch(RecordExistException ree){            throw new UniqueException();        }    }        /*通过班级ID删除班级*/    public void delete(Integer classId) throws NotExistException, StoreException{        try{            if( get(classId)==null )                throw new NotExistException();            classDao.delete(classId);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过专业ID、登记年份获取班级*/    public List getBySpecialIdAndEnrollYear(Integer specialId,Integer enrollYear) throws StoreException{        try{            return classDao.getBySpecialIdAndEnrollYear(specialId,enrollYear);        }catch(DataAccessException dae){            throw new StoreException();        }    }        /*通过专业ID获取班级,并且按照班级登记年份排序*/    public List getBySpecialId(Integer specialId) throws StoreException{        try{            return classDao.getBySpecialIdSortEnrollYear(specialId);        }catch(DataAccessException dae){            throw new StoreException();        }    }    }

⌨️ 快捷键说明

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