
package nlib.col.service.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import nlib.col.service.RentService;
import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO;

@Service("rentService")
public class RentServiceImpl implements RentService
{
	private static final Logger log = LoggerFactory.getLogger(RentServiceImpl.class);
	
	@Resource(name="rentDAO")
	private RentDAO rentDAO;

	/* 
	 * 대출 목록 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.RentService#listRentItems(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO listRentItems(DataApiReqVO reqVO)  {
		return rentDAO.listRentItems(reqVO);
	}

	/* 
	 * 반납 연기 목록을 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.RentService#listPostpones(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO listPostpones(DataApiReqVO reqVO)  {
		return rentDAO.listPostpones(reqVO);
	}
	/* 
	 * 대출 취소 목록을 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.RentService#listCanceledRentItems(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO listCanceledRentItems(DataApiReqVO reqVO)  {
		return rentDAO.listCanceledRentItems(reqVO);
	}

	/* 
	 * 대출 예약 목록을 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.RentService#listReservations(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO listReservations(DataApiReqVO reqVO)  {
		return rentDAO.listReservations(reqVO);
	}

	public DataApiResVO cancelReservations(DataApiReqVO reqVO)  {
		return null;
	}

	/* 
	 * 열람 요청 목록을 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.RentService#listRequestsForViewingItem(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO listRequestsForViewingItem(DataApiReqVO reqVO)  {
		return rentDAO.listRequestsForViewingItem(reqVO);
	}
	/* 
	 * 열람 요청 상세 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.RentService#listRequestsForViewingItem(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO selectRequestInfoForViewingItem(DataApiReqVO reqVO)  {
		return rentDAO.selectRequestInfoForViewingItem(reqVO);
	}
}