Class CityDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.geocodes.business.CityDAO
-
-
Constructor Summary
Constructors Constructor Description CityDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCityChanges(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.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)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 listCityinsert(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 tablejava.util.List<City>loadByCode(java.lang.String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tablejava.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 tablejava.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 listjava.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 listjava.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 listjava.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 listjava.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 referenceListjava.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 listjava.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 listjava.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 listjava.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 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 referenceListCityselectCityByCodeAndDate(java.lang.String code, java.util.Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin)CityChangesselectCityChangesByCodeAndDate(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 listjava.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 itjava.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 listvoidstore(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the tableCityChangesstoreChanges(CityChanges cityChanges, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of the city object and returns it
-
-
-
Method Detail
-
insert
public City insert(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.
-
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:
addCityChangesin interfaceICityDAO- Parameters:
city- instance of the City object to insertplugin- 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:
searchCitiesChangesin interfaceICityDAO- 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:
selectCityChangesByCodeAndDatein interfaceICityDAOplugin- 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:
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
public java.util.Optional<City> load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table
-
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:
loadByCodein interfaceICityDAOplugin- 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:
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
public void store(City city, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
-
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:
selectCitiesListin interfaceICityDAO- 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:
selectCitiesListByValuein interfaceICityDAOplugin- 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:
selectCitiesListByValueLikein interfaceICityDAOplugin- 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:
getChangesExistencein interfaceICityDAO
-
selectCityByCodeAndDate
public City selectCityByCodeAndDate(java.lang.String code, java.util.Date date, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
selectCityByCodeAndDatein interfaceICityDAO
-
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:
selectCitiesCodesListByDatein interfaceICityDAO- Parameters:
dateCity- date of the cityplugin- 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:
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 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:
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 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:
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 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:
selectCitiesListByIdsin interfaceICityDAOlistIds- 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: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
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:
selectCitiesListByLastDatein interfaceICityDAO- Parameters:
plugin- the Plugin- Returns:
- The list
which contains the data of all the city objects
-
-