コード例 #1
0
ファイル: CategoryModel.java プロジェクト: shenzhe/javablog
  public int deleteCategory(int id) {
    ICategoryDao icd = getSession().getMapper(ICategoryDao.class);

    int result = icd.delete(id);

    closeSession();

    return result;
  }
コード例 #2
0
ファイル: CategoryModel.java プロジェクト: shenzhe/javablog
  public int updateCategory(CategoryEntity ce) {
    ICategoryDao icd = getSession().getMapper(ICategoryDao.class);

    int result = icd.update(ce);

    closeSession();

    return result;
  }
コード例 #3
0
ファイル: CategoryModel.java プロジェクト: shenzhe/javablog
  public CategoryEntity getCategory(int id) {

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

    CategoryEntity ce = icd.selectOne(id);

    closeSession();

    return ce;
  }
コード例 #4
0
ファイル: CategoryModel.java プロジェクト: shenzhe/javablog
  public List getList() {

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

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

    closeSession();

    return celist;
  }