Class CityDAO

  • All Implemented Interfaces:
    ICityDAO

    public final class CityDAO
    extends Object
    implements ICityDAO
    This class provides Data Access methods for City objects
    • Constructor Detail

      • CityDAO

        public CityDAO()
    • Method Detail

      • insert

        public void 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
      • load

        public 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 Optional<City> loadByCode​(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 Optional<City> loadByDateAndCode​(Date dateCode,
                                                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 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 List<City> selectCitiesListByValue​(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 List<City> selectCitiesListByValueLike​(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
      • selectCitiesListByValueAndDate

        public List<City> selectCitiesListByValueAndDate​(String strVal,
                                                         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 List<City> selectCitiesListByValueAndDateLike​(String strVal,
                                                             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 List<Integer> selectIdCitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        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 List<City> selectCitiesListByIds​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                List<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
      • selectCitiesListByLastDate

        public 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