KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > samples > jpetstore > dao > ibatis > SqlMapCategoryDao


1 package org.springframework.samples.jpetstore.dao.ibatis;
2
3 import java.util.List JavaDoc;
4
5 import org.springframework.dao.DataAccessException;
6 import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
7 import org.springframework.samples.jpetstore.dao.CategoryDao;
8 import org.springframework.samples.jpetstore.domain.Category;
9
10 public class SqlMapCategoryDao extends SqlMapClientDaoSupport implements CategoryDao {
11
12   public List JavaDoc getCategoryList() throws DataAccessException {
13     return getSqlMapClientTemplate().queryForList("getCategoryList", null);
14   }
15
16   public Category getCategory(String JavaDoc categoryId) throws DataAccessException {
17     return (Category) getSqlMapClientTemplate().queryForObject("getCategory", categoryId);
18   }
19
20 }
21
Popular Tags