/** * * @(#) CarDAO.java * created date : 2008. 01. 23 * * (c) Copyright by Hyundai HDS Inc., * All rights reserved. http://www.hyundaihds.co.kr */ package ibatis.dao.sqlmap; import java.sql.SQLException; import java.util.List; import ibatis.dao.SqlMapFactory; import ibatis.dto.Car; import com.ibatis.sqlmap.client.SqlMapClient; /** * * @author Youbok, Choi * @version 1.0 * */ public class CarDAO { private static SqlMapClient sqlMap = SqlMapFactory.getInstance(); public List getCarList(int skip, int num) throws SQLException { return (List)sqlMap.queryForList("getCarList"); } public void insertCar(Car car) throws SQLException { sqlMap.insert("insertCar", car); } public void updateCar(Car car) throws SQLException { sqlMap.insert("updateCar", car); } public void deleteCar(Car car) throws SQLException { sqlMap.insert("deleteCar", car); } public Car getCar(String id) throws SQLException { return (Car)sqlMap.queryForObject("getCar", id); } }