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

    int result = icd.delete(id);

    closeSession();

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

    int result = icd.update(ce);

    closeSession();

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

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

    CategoryEntity ce = icd.selectOne(id);

    closeSession();

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

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

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

    closeSession();

    return celist;
  }