Class CityDAO
java.lang.Object
fr.paris.lutece.plugins.geocodes.business.CityDAO
- All Implemented Interfaces:
ICityDAO
This class provides Data Access methods for City objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCityChanges(City city, String author, String status, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the history table.voiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tablebooleangetChangesExistence(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin) getCitiesListByCode(fr.paris.lutece.portal.service.plugin.Plugin plugin, String code) Load the data of all the avant objects and returns them as a listInsert a new record in the table.load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableloadByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableloadByDateAndCode(Date dateCode, String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the table, non deprecated codes first, deprecated codes if none is foundsearchCitiesChanges(fr.paris.lutece.portal.service.plugin.Plugin plugin, String cityLabel, String cityCode, String placeCode, boolean approximateSearch, String status) Load the data of all the city objects and returns them as a listselectCitiesCodesListByDate(Date dateCity, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city codes objects and returns them as a listselectCitiesList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a listselectCitiesListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a listselectCitiesListByLastDate(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 referenceListselectCitiesListByValue(String strVal, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a listselectCitiesListByValueAndDate(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 listselectCitiesListByValueAndDateLike(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 listselectCitiesListByValueLike(String strVal, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a listfr.paris.lutece.util.ReferenceListselectCitiesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a referenceListselectCityByCodeAndDate(String code, Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin) selectCityChangesByCodeAndDate(String code, Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a listselectCityChangesListByCode(String code, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns itselectIdCitiesList(fr.paris.lutece.portal.service.plugin.Plugin plugin, String cityLabel, String cityCode, String placeCode, boolean approximateSearch) Load the id of all the city objects and returns them as a listvoidUpdate the record in the tablestoreChanges(CityChanges cityChanges, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns it
-
Constructor Details
-
CityDAO
public CityDAO()
-
-
Method Details
-
insert
Insert a new record in the table. -
addCityChanges
public void addCityChanges(City city, String author, String status, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the history table.- Specified by:
addCityChangesin interfaceICityDAO- Parameters:
city- instance of the City object to insertplugin- the Plugin
-
searchCitiesChanges
public List<String> searchCitiesChanges(fr.paris.lutece.portal.service.plugin.Plugin plugin, String cityLabel, String cityCode, String placeCode, boolean approximateSearch, String status) Load the data of all the city objects and returns them as a list- Specified by:
searchCitiesChangesin interfaceICityDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the data of all the cities that have changes
-
selectCityChangesByCodeAndDate
public CityChanges selectCityChangesByCodeAndDate(String code, 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:
selectCityChangesByCodeAndDatein interfaceICityDAOplugin- the Plugin- Returns:
- The list which contains the data of all the city objects
-
selectCityChangesListByCode
public List<CityChanges> selectCityChangesListByCode(String code, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns it- Specified by:
selectCityChangesListByCodein interfaceICityDAOplugin- 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:
storeChangesin interfaceICityDAO- Parameters:
cityChanges- The CityHistory to updateplugin- the Plugin- Returns:
- The list which contains the data of all the city objects
-
load
Load the data from the table -
loadByCode
Load the data from the table- Specified by:
loadByCodein interfaceICityDAOplugin- 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, non deprecated codes first, deprecated codes if none is found- Specified by:
loadByDateAndCodein interfaceICityDAO- Parameters:
dateCode- the date of avaibilitystrCode- The identifier of the cityplugin- 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 -
store
Update the record in the table -
selectCitiesList
Load the data of all the city objects and returns them as a list- Specified by:
selectCitiesListin interfaceICityDAO- 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:
selectCitiesListByValuein interfaceICityDAOplugin- 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:
selectCitiesListByValueLikein interfaceICityDAOplugin- the Plugin- Returns:
- The list which contains the data of all the city objects
-
getChangesExistence
- Specified by:
getChangesExistencein interfaceICityDAO
-
selectCityByCodeAndDate
public City selectCityByCodeAndDate(String code, Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
selectCityByCodeAndDatein interfaceICityDAO
-
selectCitiesCodesListByDate
public List<String> selectCitiesCodesListByDate(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:
selectCitiesCodesListByDatein interfaceICityDAO- Parameters:
dateCity- date of the cityplugin- 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:
selectCitiesListByValueAndDatein interfaceICityDAO- Parameters:
strVal- name of the citydateCity- date of the cityplugin- 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:
selectCitiesListByValueAndDateLikein interfaceICityDAO- Parameters:
strVal- name of the citydateCity- date of the cityplugin- 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, String cityLabel, String cityCode, String placeCode, boolean approximateSearch) Load the id of all the city objects and returns them as a list- Specified by:
selectIdCitiesListin interfaceICityDAO- 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:
selectCitiesReferenceListin interfaceICityDAO- 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:
selectCitiesListByIdsin interfaceICityDAOlistIds- liste of ids- Returns:
- The list which contains the data of all the avant objects
-
getCitiesListByCode
public List<City> getCitiesListByCode(fr.paris.lutece.portal.service.plugin.Plugin plugin, String code) Description copied from interface:ICityDAOLoad the data of all the avant objects and returns them as a list- Specified by:
getCitiesListByCodein interfaceICityDAO- Returns:
- The list which contains the data of all the avant objects
-
selectCitiesListByLastDate
Load the data of all the city objects by last date update and returns them as a referenceList- Specified by:
selectCitiesListByLastDatein interfaceICityDAO- Parameters:
plugin- the Plugin- Returns:
- The list
which contains the data of all the city objects
-