Class WeatherServiceImpl

java.lang.Object
com.weather.info.service.impl.WeatherServiceImpl
All Implemented Interfaces:
WeatherService

public class WeatherServiceImpl extends Object implements WeatherService
WeatherServiceImpl is a concrete implementation of WeatherService interface and provides implementation of the methods in WeatherService.
  • Constructor Details

    • WeatherServiceImpl

      public WeatherServiceImpl()
  • Method Details

    • getWeatherInformation

      public WeatherResponseVO getWeatherInformation(long pincode, String date)
      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 interface WeatherService
      Parameters:
      pincode - pincode represents the zip code for which the weather information needs to be fetched
      date - date represents the data for which the weather information needs to be fetched.
      Returns:
      Weather information for a pincode for a particular date.