Class CityHome
- java.lang.Object
-
- fr.paris.lutece.plugins.geocodes.business.CityHome
-
public final class CityHome extends Object
This class provides instances management methods (create, find, ...) for City objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Citycreate(City city)Create an instance of the city classstatic Optional<City>findByCode(String strCode)Returns an instance of a city whose identifier is specified in parameterstatic Optional<City>findByDateAndCode(Date dateCity, String strCode)Returns an instance of a city whose identifier is specified in parameterstatic Optional<City>findByPrimaryKey(int nKey)Returns an instance of a city whose identifier is specified in parameterstatic List<City>getCitiesList()Load the data of all the city objects and returns them as a liststatic List<City>getCitiesListByIds(List<Integer> listIds)Load the data of all the avant objects and returns them as a liststatic List<City>getCitiesListByLastDate()Load the data of all the city objects by last date update and returns them as a liststatic List<City>getCitiesListByName(String strVal)Load the data of all the city objects and returns them as a liststatic List<City>getCitiesListByNameAndDate(String strVal, Date dateCity)Load the data of all the city objects and returns them as a liststatic List<City>getCitiesListByNameAndDateLike(String strVal, Date dateCity)Load the data of all the city objects and returns them as a liststatic List<City>getCitiesListByNameLike(String strVal)Load the data of all the city objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListgetCitiesReferenceList()Load the data of all the city objects and returns them as a referenceListstatic List<Integer>getIdCitiesList()Load the id of all the city objects and returns them as a liststatic voidremove(int nKey)Remove the city whose identifier is specified in parameterstatic Cityupdate(City city)Update of the city which is specified in parameter
-
-
-
Method Detail
-
create
public static City create(City city)
Create an instance of the city class- Parameters:
city- The instance of the City which contains the informations to store- Returns:
- The instance of city which has been created with its primary key.
-
update
public static City update(City city)
Update of the city which is specified in parameter- Parameters:
city- The instance of the City which contains the data to store- Returns:
- The instance of the city which has been updated
-
remove
public static void remove(int nKey)
Remove the city whose identifier is specified in parameter- Parameters:
nKey- The city Id
-
findByPrimaryKey
public static Optional<City> findByPrimaryKey(int nKey)
Returns an instance of a city whose identifier is specified in parameter- Parameters:
nKey- The city primary key- Returns:
- an instance of City
-
findByCode
public static Optional<City> findByCode(String strCode)
Returns an instance of a city whose identifier is specified in parameter- Parameters:
nKey- The city primary key- Returns:
- an instance of City
-
getCitiesList
public static List<City> getCitiesList()
Load the data of all the city objects and returns them as a list- Returns:
- the list which contains the data of all the city objects
-
getCitiesListByName
public static List<City> getCitiesListByName(String strVal)
Load the data of all the city objects and returns them as a list- Returns:
- the list which contains the data of all the city objects
-
getCitiesListByNameLike
public static List<City> getCitiesListByNameLike(String strVal)
Load the data of all the city objects and returns them as a list- Returns:
- the list which contains the data of all the city objects
-
getIdCitiesList
public static List<Integer> getIdCitiesList()
Load the id of all the city objects and returns them as a list- Returns:
- the list which contains the id of all the city objects
-
getCitiesReferenceList
public static fr.paris.lutece.util.ReferenceList getCitiesReferenceList()
Load the data of all the city objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the city objects
-
getCitiesListByIds
public static List<City> getCitiesListByIds(List<Integer> listIds)
Load the data of all the avant objects and returns them as a list- Parameters:
listIds- liste of ids- Returns:
- the list which contains the data of all the avant objects
-
findByDateAndCode
public static Optional<City> findByDateAndCode(Date dateCity, String strCode)
Returns an instance of a city whose identifier is specified in parameter- Parameters:
strCode- The city primary keydateCity- date of city- Returns:
- an instance of City
-
getCitiesListByNameAndDate
public static List<City> getCitiesListByNameAndDate(String strVal, Date dateCity)
Load the data of all the city objects and returns them as a list- Parameters:
strVal- The city namedateCity- date of city- Returns:
- the list which contains the data of all the city objects
-
getCitiesListByNameAndDateLike
public static List<City> getCitiesListByNameAndDateLike(String strVal, Date dateCity)
Load the data of all the city objects and returns them as a list- Parameters:
strVal- The city namedateCity- date of city- Returns:
- the list which contains the data of all the city objects
-
-