Class GeoCodesService


  • public class GeoCodesService
    extends Object
    • Method Detail

      • getInstance

        public static GeoCodesService getInstance()
        Get the instance of GeoCodeService
        Returns:
        an instance of GeoCodeService
      • getCityByCode

        public Optional<City> getCityByCode​(String strCode)
        get city by code
        Parameters:
        strCodel -
        Returns:
        the city (as Optional)
      • getCitiesListByName

        public List<City> getCitiesListByName​(String strSearchBeginningVal)
        search cities by name beginning with a string
        Parameters:
        strSearchBeginningVal -
        Returns:
        the list
      • getCitiesListByNameLike

        public List<City> getCitiesListByNameLike​(String strSearchBeginningVal)
        search cities by name beginning with a string
        Parameters:
        strSearchBeginningVal -
        Returns:
        the list
      • getCitiesListByNameAndDate

        public List<City> getCitiesListByNameAndDate​(String strSearchBeginningVal,
                                                     Date dateCity)
        search cities by name beginning with a string and a date
        Parameters:
        strSearchBeginningVal -
        dateCity -
        Returns:
        the list
      • getCitiesListByNameAndDateLike

        public List<City> getCitiesListByNameAndDateLike​(String strSearchBeginningVal,
                                                         Date dateCity)
        search cities by name beginning with a string and a date
        Parameters:
        strSearchBeginningVal -
        dateCity -
        Returns:
        the list
      • getCountryByCode

        public Optional<Country> getCountryByCode​(String strCode)
        get country by code
        Parameters:
        strCode -
        Returns:
        the country (as Optional)
      • getCountryByCode

        public Optional<Country> getCountryByCode​(String strCode,
                                                  boolean bAttached)
        get country by code
        Parameters:
        strCode -
        Returns:
        the country (as Optional)
      • getCountriesListByName

        public List<Country> getCountriesListByName​(String strSearchBeginningVal,
                                                    Date dateRef)
        search countries by name
        Parameters:
        strSearchBeginningVal -
        Returns:
        the list
      • getCityByDateAndCode

        public Optional<City> getCityByDateAndCode​(Date dateCity,
                                                   String strCode)
        get city by code and date
        Parameters:
        strCodel -
        dateCity -
        Returns:
        the city (as Optional)
      • getCitiesListByLastDateUpdate

        public static List<City> getCitiesListByLastDateUpdate()
        search cities by name beginning with a string
        Returns:
        the list
      • updateCity

        public static void updateCity​(City cityUpdate)
        update the city informations
        Parameters:
        cityUpdate - : the city to update
      • createCity

        public static void createCity​(City cityNew)
        create the new city
        Parameters:
        cityNew - : the city to create
      • checkDateValidityStart

        public static Date checkDateValidityStart​(Date dateCheck)