package jp.ossc.petstore.dao.impl;

import jp.ossc.petstore.dao.IOrderDetailDAO;
import jp.ossc.petstore.dao.impl.BaseDAO;
import jp.ossc.petstore.model.Order;
import jp.ossc.petstore.model.OrderDetail;
import jp.ossc.petstore.model.Product;

/**
 * 注文明細情報テーブルアクセスクラス
 * @author ossc
 * @version $Revision: 1.2 $
 */
public class OrderDetailDAO extends BaseDAO implements IOrderDetailDAO {

	/* (非 Javadoc)
	 * @see jp.ossc.petstore.dao.IOrderDetailDAO#insertOrderDetail(jp.ossc.petstore.model.Order, jp.ossc.petstore.model.Product, int)
	 */
	public void insertOrderDetail(Order order, Product product, int number) {

		OrderDetail detail = new OrderDetail(number, product, order);
		getHibernateTemplate().save(detail);

	}

}
