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