public int deleteCategory(int id) { ICategoryDao icd = getSession().getMapper(ICategoryDao.class); int result = icd.delete(id); closeSession(); return result; }
public int updateCategory(CategoryEntity ce) { ICategoryDao icd = getSession().getMapper(ICategoryDao.class); int result = icd.update(ce); closeSession(); return result; }
public CategoryEntity getCategory(int id) { ICategoryDao icd = getSession().getMapper(ICategoryDao.class); CategoryEntity ce = icd.selectOne(id); closeSession(); return ce; }
public List getList() { ICategoryDao icd = getSession().getMapper(ICategoryDao.class); List<CategoryEntity> celist = icd.selectList(); closeSession(); return celist; }