Class CityHome


  • public final class CityHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for City objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static City addCityChanges​(City city, java.lang.String autor, java.lang.String applied)  
      static City create​(City city)
      Create an instance of the city class
      static java.util.List<City> findByCode​(java.lang.String strCode)
      Returns an instance of a city whose identifier is specified in parameter
      static java.util.Optional<City> findByDateAndCode​(java.util.Date dateCity, java.lang.String strCode)
      Returns an instance of a city whose identifier is specified in parameter
      static java.util.Optional<City> findByPrimaryKey​(int nKey)
      Returns an instance of a city whose identifier is specified in parameter
      static java.util.List<java.lang.String> getAllCitiesWithChanges​(java.lang.String cityLabel, java.lang.String cityCode, java.lang.String placeCode, boolean approximateSearch, java.lang.String status)  
      static boolean getChangesExistence​(City city)  
      static java.util.List<CityChanges> getChangesListByCode​(java.lang.String code)  
      static java.util.List<java.lang.String> getCitiesCodesListByDate​(java.util.Date dateCity)
      Load the data of all the city codes and returns them as a list
      static java.util.List<City> getCitiesList()
      Load the data of all the city objects and returns them as a list
      static java.util.List<City> getCitiesListByCode​(java.lang.String code)
      Load the data of all the avant objects and returns them as a list
      static java.util.List<City> getCitiesListByIds​(java.util.List<java.lang.Integer> listIds)
      Load the data of all the avant objects and returns them as a list
      static java.util.List<City> getCitiesListByLastDate()
      Load the data of all the city objects by last date update and returns them as a list
      static java.util.List<City> getCitiesListByName​(java.lang.String strVal)
      Load the data of all the city objects and returns them as a list
      static java.util.List<City> getCitiesListByNameAndDate​(java.lang.String strVal, java.util.Date dateCity)
      Load the data of all the city objects and returns them as a list
      static java.util.List<City> getCitiesListByNameAndDateLike​(java.lang.String strVal, java.util.Date dateCity)
      Load the data of all the city objects and returns them as a list
      static java.util.List<City> getCitiesListByNameLike​(java.lang.String strVal)
      Load the data of all the city objects and returns them as a list
      static fr.paris.lutece.util.ReferenceList getCitiesReferenceList()
      Load the data of all the city objects and returns them as a referenceList
      static City getCityByCodeAndDate​(java.lang.String code, java.util.Date date)  
      static CityChanges getCityChangesByCodeAndDate​(java.lang.String code, java.util.Date date)  
      static java.util.List<java.lang.Integer> getIdCitiesList​(java.lang.String cityLabel, java.lang.String cityCode, java.lang.String placeCode, boolean approximateSearch)
      Load the id of all the city objects and returns them as a list
      static void remove​(int nKey)
      Remove the city whose identifier is specified in parameter
      static City update​(City city)
      Update of the city which is specified in parameter
      static void updateChanges​(CityChanges history)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static City create​(City city)
        Create an instance of the city class
        Parameters:
        city - The instance of the City which contains the informations to store
        Returns:
        The instance of city which has been created with its primary key.
      • update

        public static City update​(City city)
        Update of the city which is specified in parameter
        Parameters:
        city - The instance of the City which contains the data to store
        Returns:
        The instance of the city which has been updated
      • addCityChanges

        public static City addCityChanges​(City city,
                                          java.lang.String autor,
                                          java.lang.String applied)
      • getAllCitiesWithChanges

        public static java.util.List<java.lang.String> getAllCitiesWithChanges​(java.lang.String cityLabel,
                                                                               java.lang.String cityCode,
                                                                               java.lang.String placeCode,
                                                                               boolean approximateSearch,
                                                                               java.lang.String status)
      • getCityChangesByCodeAndDate

        public static CityChanges getCityChangesByCodeAndDate​(java.lang.String code,
                                                              java.util.Date date)
      • getChangesListByCode

        public static java.util.List<CityChanges> getChangesListByCode​(java.lang.String code)
      • updateChanges

        public static void updateChanges​(CityChanges history)
      • remove

        public static void remove​(int nKey)
        Remove the city whose identifier is specified in parameter
        Parameters:
        nKey - The city Id
      • findByPrimaryKey

        public static java.util.Optional<City> findByPrimaryKey​(int nKey)
        Returns an instance of a city whose identifier is specified in parameter
        Parameters:
        nKey - The city primary key
        Returns:
        an instance of City
      • findByCode

        public static java.util.List<City> findByCode​(java.lang.String strCode)
        Returns an instance of a city whose identifier is specified in parameter
        Parameters:
        nKey - The city primary key
        Returns:
        an instance of City
      • getCitiesList

        public static java.util.List<City> getCitiesList()
        Load the data of all the city objects and returns them as a list
        Returns:
        the list which contains the data of all the city objects
      • getCitiesListByName

        public static java.util.List<City> getCitiesListByName​(java.lang.String strVal)
        Load the data of all the city objects and returns them as a list
        Returns:
        the list which contains the data of all the city objects
      • getCitiesListByNameLike

        public static java.util.List<City> getCitiesListByNameLike​(java.lang.String strVal)
        Load the data of all the city objects and returns them as a list
        Returns:
        the list which contains the data of all the city objects
      • getIdCitiesList

        public static java.util.List<java.lang.Integer> getIdCitiesList​(java.lang.String cityLabel,
                                                                        java.lang.String cityCode,
                                                                        java.lang.String placeCode,
                                                                        boolean approximateSearch)
        Load the id of all the city objects and returns them as a list
        Returns:
        the list which contains the id of all the city objects
      • getCitiesReferenceList

        public static fr.paris.lutece.util.ReferenceList getCitiesReferenceList()
        Load the data of all the city objects and returns them as a referenceList
        Returns:
        the referenceList which contains the data of all the city objects
      • getCitiesListByIds

        public static java.util.List<City> getCitiesListByIds​(java.util.List<java.lang.Integer> listIds)
        Load the data of all the avant objects and returns them as a list
        Parameters:
        listIds - liste of ids
        Returns:
        the list which contains the data of all the avant objects
      • getCitiesListByCode

        public static java.util.List<City> getCitiesListByCode​(java.lang.String code)
        Load the data of all the avant objects and returns them as a list
        Parameters:
        listIds - liste of ids
        Returns:
        the list which contains the data of all the avant objects
      • findByDateAndCode

        public static java.util.Optional<City> findByDateAndCode​(java.util.Date dateCity,
                                                                 java.lang.String strCode)
        Returns an instance of a city whose identifier is specified in parameter
        Parameters:
        strCode - The city primary key
        dateCity - date of city
        Returns:
        an instance of City
      • getCitiesCodesListByDate

        public static java.util.List<java.lang.String> getCitiesCodesListByDate​(java.util.Date dateCity)
        Load the data of all the city codes and returns them as a list
        Parameters:
        dateCity - date of city
        Returns:
        the list which contains the data of all the city objects
      • getCitiesListByNameAndDate

        public static java.util.List<City> getCitiesListByNameAndDate​(java.lang.String strVal,
                                                                      java.util.Date dateCity)
        Load the data of all the city objects and returns them as a list
        Parameters:
        strVal - The city name
        dateCity - date of city
        Returns:
        the list which contains the data of all the city objects
      • getCitiesListByNameAndDateLike

        public static java.util.List<City> getCitiesListByNameAndDateLike​(java.lang.String strVal,
                                                                          java.util.Date dateCity)
        Load the data of all the city objects and returns them as a list
        Parameters:
        strVal - The city name
        dateCity - date of city
        Returns:
        the list which contains the data of all the city objects
      • getCitiesListByLastDate

        public static java.util.List<City> getCitiesListByLastDate()
        Load the data of all the city objects by last date update and returns them as a list
        Returns:
        the list which contains the data of all the city objects by last date update
      • getChangesExistence

        public static boolean getChangesExistence​(City city)
      • getCityByCodeAndDate

        public static City getCityByCodeAndDate​(java.lang.String code,
                                                java.util.Date date)