package incheon.sgp.ipd.eduresource.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.eduresource.vo.ChildcareVO;
import incheon.sgp.ipd.eduresource.vo.KindergartenVO;
import incheon.sgp.ipd.eduresource.vo.SchoolDistrictVO;
import incheon.sgp.ipd.eduresource.vo.SchoolVO;


@org.egovframe.rte.psl.dataaccess.mapper.Mapper @incheon.com.config.annotation.ExternalDB
public interface EduResourceMapper {

	SchoolDistrictVO selectAllMiddleSchoolDistrict();

	SchoolDistrictVO selectMiddleSchoolDistrict(
	    @Param("latitude") String latitude,
	    @Param("longitude") String longitude
	);
	
	SchoolDistrictVO selectHighSchoolDistrict(
	    @Param("latitude") String latitude,
	    @Param("longitude") String longitude
	);
	
	SchoolDistrictVO selectElementarySchoolDistrict(
	    @Param("latitude") String latitude,
	    @Param("longitude") String longitude
	);
	
	List<SchoolVO> getSchoolListByRadiusAll(
	    @Param("latitude") double latitude,
	    @Param("longitude") double longitude,
	    @Param("radius") double radius, 
	    @Param("offset") int offset,
	    @Param("limit") int limit		
	);
	
	List<SchoolVO> getSchoolListByRadius(
	    @Param("latitude") double latitude,
	    @Param("longitude") double longitude,
	    @Param("radius") double radius, 
	    @Param("offset") int offset,
	    @Param("limit") int limit,
	    @Param("type") String type
	);
	
	List<KindergartenVO> getKindergartenByRadius(
	    @Param("latitude") double latitude,
	    @Param("longitude") double longitude,
	    @Param("radius") double radius,
	    @Param("offset") int offset,
	    @Param("limit") int limit
	);
	
	List<ChildcareVO> getChildcareCenterByRadius(
	    @Param("latitude") double latitude,
	    @Param("longitude") double longitude,
	    @Param("radius") double radius,
	    @Param("offset") int offset,
	    @Param("limit") int limit
	);

	SchoolVO findSchoolByInfo(
			@Param("latitude") double latitude, 
			@Param("longitude") double longitude, 
			@Param("name") String name, 
			@Param("type") String type
	);

	ChildcareVO findChildcareByInfo(
			@Param("latitude") double latitude, 
			@Param("longitude") double longitude, 
			@Param("name") String name
	);

	KindergartenVO findKindergartenByInfo(
			@Param("latitude") double latitude, 
			@Param("longitude") double longitude, 
			@Param("name") String name
	);
}