Class GeoCodesService
- java.lang.Object
-
- fr.paris.lutece.plugins.geocodes.service.GeoCodesService
-
public class GeoCodesService extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DatecheckDateValidityStart(Date dateCheck)static voidcreateCity(City cityNew)create the new citystatic List<City>getCitiesListByLastDateUpdate()search cities by name beginning with a stringList<City>getCitiesListByName(String strSearchBeginningVal)search cities by name beginning with a stringList<City>getCitiesListByNameAndDate(String strSearchBeginningVal, Date dateCity)search cities by name beginning with a string and a dateList<City>getCitiesListByNameAndDateLike(String strSearchBeginningVal, Date dateCity)search cities by name beginning with a string and a dateList<City>getCitiesListByNameLike(String strSearchBeginningVal)search cities by name beginning with a stringOptional<City>getCityByCode(String strCode)get city by codeOptional<City>getCityByDateAndCode(Date dateCity, String strCode)get city by code and dateList<Country>getCountriesListByName(String strSearchBeginningVal, Date dateRef)search countries by nameOptional<Country>getCountryByCode(String strCode)get country by codeOptional<Country>getCountryByCode(String strCode, boolean bAttached)get country by codestatic GeoCodesServicegetInstance()Get the instance of GeoCodeServicestatic voidupdateCity(City cityUpdate)update the city informations
-
-
-
Method Detail
-
getInstance
public static GeoCodesService getInstance()
Get the instance of GeoCodeService- Returns:
- an instance of GeoCodeService
-
getCityByCode
public Optional<City> getCityByCode(String strCode)
get city by code- Parameters:
strCodel-- Returns:
- the city (as Optional)
-
getCitiesListByName
public List<City> getCitiesListByName(String strSearchBeginningVal)
search cities by name beginning with a string- Parameters:
strSearchBeginningVal-- Returns:
- the list
-
getCitiesListByNameLike
public List<City> getCitiesListByNameLike(String strSearchBeginningVal)
search cities by name beginning with a string- Parameters:
strSearchBeginningVal-- Returns:
- the list
-
getCitiesListByNameAndDate
public List<City> getCitiesListByNameAndDate(String strSearchBeginningVal, Date dateCity)
search cities by name beginning with a string and a date- Parameters:
strSearchBeginningVal-dateCity-- Returns:
- the list
-
getCitiesListByNameAndDateLike
public List<City> getCitiesListByNameAndDateLike(String strSearchBeginningVal, Date dateCity)
search cities by name beginning with a string and a date- Parameters:
strSearchBeginningVal-dateCity-- Returns:
- the list
-
getCountryByCode
public Optional<Country> getCountryByCode(String strCode)
get country by code- Parameters:
strCode-- Returns:
- the country (as Optional)
-
getCountryByCode
public Optional<Country> getCountryByCode(String strCode, boolean bAttached)
get country by code- Parameters:
strCode-- Returns:
- the country (as Optional)
-
getCountriesListByName
public List<Country> getCountriesListByName(String strSearchBeginningVal, Date dateRef)
search countries by name- Parameters:
strSearchBeginningVal-- Returns:
- the list
-
getCityByDateAndCode
public Optional<City> getCityByDateAndCode(Date dateCity, String strCode)
get city by code and date- Parameters:
strCodel-dateCity-- Returns:
- the city (as Optional)
-
getCitiesListByLastDateUpdate
public static List<City> getCitiesListByLastDateUpdate()
search cities by name beginning with a string- Returns:
- the list
-
updateCity
public static void updateCity(City cityUpdate)
update the city informations- Parameters:
cityUpdate- : the city to update
-
createCity
public static void createCity(City cityNew)
create the new city- Parameters:
cityNew- : the city to create
-
-