Package com.weather.info.service.impl
Class WeatherServiceImpl
java.lang.Object
com.weather.info.service.impl.WeatherServiceImpl
- All Implemented Interfaces:
WeatherService
WeatherServiceImpl is a concrete implementation of WeatherService interface and provides implementation of the
methods in WeatherService.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetWeatherInformation
(long pincode, String date) This method is responsible to fetch weather information from OpenWeatherAPI and store it in RDBMS.
-
Constructor Details
-
WeatherServiceImpl
public WeatherServiceImpl()
-
-
Method Details
-
getWeatherInformation
Description copied from interface:WeatherService
This method is responsible to fetch weather information from OpenWeatherAPI and store it in RDBMS. This method also performs internal sanity checks on the given input parameters. Returns Weather information from db if already exists in db or fetches, stores and returns the information by calling OpenWeatherAPI.- Specified by:
getWeatherInformation
in interfaceWeatherService
- Parameters:
pincode
- pincode represents the zip code for which the weather information needs to be fetcheddate
- date represents the data for which the weather information needs to be fetched.- Returns:
- Weather information for a pincode for a particular date.
-