Class GeoCodesService


  • public class GeoCodesService
    extends java.lang.Object
    • Method Detail

      • getInstance

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

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

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

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

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

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

        public java.util.List<java.lang.String> getCitiesCodesListByDate​(java.util.Date dateCity)
        search cities codes by date
        Parameters:
        dateCity -
        Returns:
        the list
      • getCountryByCode

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

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

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

        public java.util.List<Country> getCountriesListByName​(java.lang.String strCountryName)
      • getCityByDateAndCode

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

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

        public static void addCityChanges​(City cityUpdate,
                                          java.lang.String author,
                                          java.lang.String status)
        update the city informations
        Parameters:
        cityUpdate - : the city to update
      • updateCityChanges

        public static void updateCityChanges​(City cityUpdate,
                                             java.lang.String author,
                                             java.lang.String status)
        update the city changes informations
        Parameters:
        cityUpdate - : the city to update
      • createCity

        public static void createCity​(City cityNew,
                                      java.lang.String author,
                                      java.lang.String applied)
        create the new city
        Parameters:
        cityNew - : the city to create
      • checkDateValidityStart

        public static java.util.Date checkDateValidityStart​(java.util.Date dateCheck)
      • checkChangesExistence

        public static boolean checkChangesExistence​(City city)