package incheon.sgp.ipd.transport.mapper;

import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import incheon.com.config.annotation.ExternalDB;
import incheon.sgp.ipd.transport.vo.BusVO;
import incheon.sgp.ipd.transport.vo.SubwayShapeVO;
import incheon.sgp.ipd.transport.vo.SubwayVO;

@org.egovframe.rte.psl.dataaccess.mapper.Mapper @incheon.com.config.annotation.ExternalDB
public interface TransportationMapper {
    
    /**
     * 반경 내 버스정류장 목록 조회
     */
    List<BusVO> getBusListByRadius(
        @Param("latitude") double latitude,
        @Param("longitude") double longitude,
        @Param("radius") double radius,
        @Param("offset") int offset,
        @Param("limit") int limit
    );
    
    /**
     * 반경 내 지하철역 목록 조회
     */
    List<SubwayVO> getSubwayListByRadius(
        @Param("latitude") double latitude,
        @Param("longitude") double longitude,
        @Param("radius") double radius,
        @Param("offset") int offset,
        @Param("limit") int limit
    );
    
    /**
     * 버스 노선 ID로 조회
     */
    String getBusRouteNameById(@Param("routeId") int routeId);
    
    /**
     * 버스 노선명 조회
     */
    String getBusRouteName(@Param("routeId") String routeId);
    
    /**
     * 반경 내 지하철역 폴리곤 조회
     */
    List<SubwayShapeVO> getSubwayStPolyGonRadius(
        @Param("latitude") double latitude,
        @Param("longitude") double longitude,
        @Param("radius") double radius,
        @Param("offset") int offset,
        @Param("limit") int limit
    );
    
    /**
     * 지하철 노선 조회
     */
    List<SubwayShapeVO> getSubwayLine(
        @Param("latitude") double latitude,
        @Param("longitude") double longitude,
        @Param("radius") double radius,
        @Param("offset") int offset,
        @Param("limit") int limit
    );
    
    /**
     * 반경 내 지하철역 지점 조회
     */
    List<SubwayVO> getSubwaySt(
        @Param("latitude") double latitude,
        @Param("longitude") double longitude,
        @Param("radius") double radius,
        @Param("offset") int offset,
        @Param("limit") int limit
    );
    
    /**
     * 반경 내 지하철 출구 조회
     */
    List<SubwayVO> getSubwayExit(
        @Param("latitude") double latitude,
        @Param("longitude") double longitude,
        @Param("radius") double radius,
        @Param("offset") int offset,
        @Param("limit") int limit
    );
    
    /** 
     * 위치,이름을 통한 버스 정보 조회
     * */
	BusVO findBusByRadius(
			@Param("latitude") double latitude, 
			@Param("longitude") double longitude, 
			@Param("name") String name
	);
}