Class CityDAO

  • All Implemented Interfaces:
    ICityDAO

    public final class CityDAO
    extends java.lang.Object
    implements ICityDAO
    This class provides Data Access methods for City objects
    • Constructor Summary

      Constructors 
      Constructor Description
      CityDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCityChanges​(City city, java.lang.String author, java.lang.String status, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the history table.
      void delete​(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      boolean getChangesExistence​(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      java.util.List<City> getCitiesListByCode​(fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String code)
      Load the data of all the avant objects and returns them as a list
      City insert​(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      java.util.Optional<City> load​(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      java.util.List<City> loadByCode​(java.lang.String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      java.util.Optional<City> loadByDateAndCode​(java.util.Date dateCode, java.lang.String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      java.util.List<java.lang.String> searchCitiesChanges​(fr.paris.lutece.portal.service.plugin.Plugin plugin, java.lang.String cityLabel, java.lang.String cityCode, java.lang.String placeCode, boolean approximateSearch, java.lang.String status)
      Load the data of all the city objects and returns them as a list
      java.util.List<java.lang.String> selectCitiesCodesListByDate​(java.util.Date dateCity, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city codes objects and returns them as a list
      java.util.List<City> selectCitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a list
      java.util.List<City> selectCitiesListByIds​(fr.paris.lutece.portal.service.plugin.Plugin plugin, java.util.List<java.lang.Integer> listIds)
      Load the data of all the avant objects and returns them as a list
      java.util.List<City> selectCitiesListByLastDate​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects by last date update and returns them as a referenceList
      java.util.List<City> selectCitiesListByValue​(java.lang.String strVal, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a list
      java.util.List<City> selectCitiesListByValueAndDate​(java.lang.String strVal, java.util.Date dateCity, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a list
      java.util.List<City> selectCitiesListByValueAndDateLike​(java.lang.String strVal, java.util.Date dateCity, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a list
      java.util.List<City> selectCitiesListByValueLike​(java.lang.String strVal, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a list
      fr.paris.lutece.util.ReferenceList selectCitiesReferenceList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a referenceList
      City selectCityByCodeAndDate​(java.lang.String code, java.util.Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      CityChanges selectCityChangesByCodeAndDate​(java.lang.String code, java.util.Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the city objects and returns them as a list
      java.util.List<CityChanges> selectCityChangesListByCode​(java.lang.String code, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of the city object and returns it
      java.util.List<java.lang.Integer> selectIdCitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin, 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
      void store​(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      CityChanges storeChanges​(CityChanges cityChanges, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of the city object and returns it
      • Methods inherited from class java.lang.Object

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

      • CityDAO

        public CityDAO()
    • Method Detail

      • insert

        public City insert​(City city,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table.
        Specified by:
        insert in interface ICityDAO
        Parameters:
        city - instance of the City object to insert
        plugin - the Plugin
      • addCityChanges

        public void addCityChanges​(City city,
                                   java.lang.String author,
                                   java.lang.String status,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the history table.
        Specified by:
        addCityChanges in interface ICityDAO
        Parameters:
        city - instance of the City object to insert
        plugin - the Plugin
      • searchCitiesChanges

        public java.util.List<java.lang.String> searchCitiesChanges​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                                    java.lang.String cityLabel,
                                                                    java.lang.String cityCode,
                                                                    java.lang.String placeCode,
                                                                    boolean approximateSearch,
                                                                    java.lang.String status)
        Load the data of all the city objects and returns them as a list
        Specified by:
        searchCitiesChanges in interface ICityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the data of all the cities that have changes
      • selectCityChangesByCodeAndDate

        public CityChanges selectCityChangesByCodeAndDate​(java.lang.String code,
                                                          java.util.Date date,
                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a list
        Specified by:
        selectCityChangesByCodeAndDate in interface ICityDAO
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • selectCityChangesListByCode

        public java.util.List<CityChanges> selectCityChangesListByCode​(java.lang.String code,
                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of the city object and returns it
        Specified by:
        selectCityChangesListByCode in interface ICityDAO
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • storeChanges

        public CityChanges storeChanges​(CityChanges cityChanges,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of the city object and returns it
        Specified by:
        storeChanges in interface ICityDAO
        Parameters:
        cityChanges - The CityHistory to update
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • load

        public java.util.Optional<City> load​(int nKey,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        load in interface ICityDAO
        Parameters:
        nKey - The identifier of the city
        plugin - the Plugin
        Returns:
        The instance of the city
      • loadByCode

        public java.util.List<City> loadByCode​(java.lang.String strCode,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        loadByCode in interface ICityDAO
        plugin - the Plugin
        Returns:
        The instance of the city
      • loadByDateAndCode

        public java.util.Optional<City> loadByDateAndCode​(java.util.Date dateCode,
                                                          java.lang.String strCode,
                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        loadByDateAndCode in interface ICityDAO
        Parameters:
        dateCode - the date of avaibility
        strCode - The identifier of the city
        plugin - the Plugin
        Returns:
        The instance of the city
      • delete

        public void delete​(int nKey,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Specified by:
        delete in interface ICityDAO
        Parameters:
        nKey - The identifier of the City to delete
        plugin - the Plugin
      • store

        public void store​(City city,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record in the table
        Specified by:
        store in interface ICityDAO
        Parameters:
        city - the reference of the City
        plugin - the Plugin
      • selectCitiesList

        public java.util.List<City> selectCitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a list
        Specified by:
        selectCitiesList in interface ICityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • selectCitiesListByValue

        public java.util.List<City> selectCitiesListByValue​(java.lang.String strVal,
                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a list
        Specified by:
        selectCitiesListByValue in interface ICityDAO
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • selectCitiesListByValueLike

        public java.util.List<City> selectCitiesListByValueLike​(java.lang.String strVal,
                                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a list
        Specified by:
        selectCitiesListByValueLike in interface ICityDAO
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • getChangesExistence

        public boolean getChangesExistence​(City city,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        getChangesExistence in interface ICityDAO
      • selectCityByCodeAndDate

        public City selectCityByCodeAndDate​(java.lang.String code,
                                            java.util.Date date,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        selectCityByCodeAndDate in interface ICityDAO
      • selectCitiesCodesListByDate

        public java.util.List<java.lang.String> selectCitiesCodesListByDate​(java.util.Date dateCity,
                                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city codes objects and returns them as a list
        Specified by:
        selectCitiesCodesListByDate in interface ICityDAO
        Parameters:
        dateCity - date of the city
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • selectCitiesListByValueAndDate

        public java.util.List<City> selectCitiesListByValueAndDate​(java.lang.String strVal,
                                                                   java.util.Date dateCity,
                                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a list
        Specified by:
        selectCitiesListByValueAndDate in interface ICityDAO
        Parameters:
        strVal - name of the city
        dateCity - date of the city
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • selectCitiesListByValueAndDateLike

        public java.util.List<City> selectCitiesListByValueAndDateLike​(java.lang.String strVal,
                                                                       java.util.Date dateCity,
                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a list
        Specified by:
        selectCitiesListByValueAndDateLike in interface ICityDAO
        Parameters:
        strVal - name of the city
        dateCity - date of the city
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects
      • selectIdCitiesList

        public java.util.List<java.lang.Integer> selectIdCitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                                    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
        Specified by:
        selectIdCitiesList in interface ICityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the id of all the city objects
      • selectCitiesReferenceList

        public fr.paris.lutece.util.ReferenceList selectCitiesReferenceList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects and returns them as a referenceList
        Specified by:
        selectCitiesReferenceList in interface ICityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The referenceList which contains the data of all the city objects
      • selectCitiesListByIds

        public java.util.List<City> selectCitiesListByIds​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                          java.util.List<java.lang.Integer> listIds)
        Load the data of all the avant objects and returns them as a list
        Specified by:
        selectCitiesListByIds in interface ICityDAO
        listIds - liste of ids
        Returns:
        The list which contains the data of all the avant objects
      • getCitiesListByCode

        public java.util.List<City> getCitiesListByCode​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                        java.lang.String code)
        Description copied from interface: ICityDAO
        Load the data of all the avant objects and returns them as a list
        Specified by:
        getCitiesListByCode in interface ICityDAO
        Returns:
        The list which contains the data of all the avant objects
      • selectCitiesListByLastDate

        public java.util.List<City> selectCitiesListByLastDate​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the city objects by last date update and returns them as a referenceList
        Specified by:
        selectCitiesListByLastDate in interface ICityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the data of all the city objects