Example #1
0
  public int deleteCategory(int id) {
    ICategoryDao icd = getSession().getMapper(ICategoryDao.class);

    int result = icd.delete(id);

    closeSession();

    return result;
  }
Example #2
0
  public int updateCategory(CategoryEntity ce) {
    ICategoryDao icd = getSession().getMapper(ICategoryDao.class);

    int result = icd.update(ce);

    closeSession();

    return result;
  }
Example #3
0
  public CategoryEntity getCategory(int id) {

    ICategoryDao icd = getSession().getMapper(ICategoryDao.class);

    CategoryEntity ce = icd.selectOne(id);

    closeSession();

    return ce;
  }
Example #4
0
  public List getList() {

    ICategoryDao icd = getSession().getMapper(ICategoryDao.class);

    List<CategoryEntity> celist = icd.selectList();

    closeSession();

    return celist;
  }