Class CountryHome
- java.lang.Object
-
- fr.paris.lutece.plugins.geocodes.business.CountryHome
-
public final class CountryHome extends java.lang.ObjectThis class provides instances management methods (create, find, ...) for Country objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CountryaddCountryChanges(Country country, java.util.Date dateUpdate, java.lang.String autor, java.lang.String applied)static Countrycreate(Country country)Create an instance of the country classstatic java.util.Optional<Country>findByCode(java.lang.String strCode)Returns an instance of a country whose identifier is specified in parameterstatic java.util.Optional<Country>findByCode(java.lang.String strCode, boolean bAttached)Returns an instance of a country whose identifier is specified in parameterstatic java.util.Optional<Country>findByPrimaryKey(int nKey)Returns an instance of a country whose identifier is specified in parameterstatic CountryChangesgetChangesFromChangesId(int id)static java.util.List<Country>getCountriesList()Load the data of all the country objects and returns them as a liststatic java.util.List<Country>getCountriesListByIds(java.util.List<java.lang.Integer> listIds)Load the data of all the avant objects and returns them as a liststatic java.util.List<Country>getCountriesListByName(java.lang.String strSearch, java.util.Date dateRef)Load the data of all the country objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListgetCountriesReferenceList()Load the data of all the country objects and returns them as a referenceListstatic java.util.List<java.lang.Integer>getIdCountriesList(java.lang.String countryLabel, java.lang.String countryCode)Load the id of all the country objects and returns them as a liststatic java.util.List<CountryChanges>getListChangesFromCountryId(int id)static voidremove(int nKey)Remove the country whose identifier is specified in parameterstatic Countryupdate(Country country)Update of the country which is specified in parameterstatic CountryChangesupdateChanges(CountryChanges history)
-
-
-
Method Detail
-
create
public static Country create(Country country)
Create an instance of the country class- Parameters:
country- The instance of the Country which contains the informations to store- Returns:
- The instance of country which has been created with its primary key.
-
update
public static Country update(Country country)
Update of the country which is specified in parameter- Parameters:
country- The instance of the Country which contains the data to store- Returns:
- The instance of the country which has been updated
-
addCountryChanges
public static Country addCountryChanges(Country country, java.util.Date dateUpdate, java.lang.String autor, java.lang.String applied)
-
getListChangesFromCountryId
public static java.util.List<CountryChanges> getListChangesFromCountryId(int id)
-
getChangesFromChangesId
public static CountryChanges getChangesFromChangesId(int id)
-
updateChanges
public static CountryChanges updateChanges(CountryChanges history)
-
remove
public static void remove(int nKey)
Remove the country whose identifier is specified in parameter- Parameters:
nKey- The country Id
-
findByPrimaryKey
public static java.util.Optional<Country> findByPrimaryKey(int nKey)
Returns an instance of a country whose identifier is specified in parameter- Parameters:
nKey- The country primary key- Returns:
- an instance of Country
-
findByCode
public static java.util.Optional<Country> findByCode(java.lang.String strCode)
Returns an instance of a country whose identifier is specified in parameter- Parameters:
nKey- The country primary key- Returns:
- an instance of Country
-
findByCode
public static java.util.Optional<Country> findByCode(java.lang.String strCode, boolean bAttached)
Returns an instance of a country whose identifier is specified in parameter- Parameters:
strCode- The country primary keybAttached- is the country attached- Returns:
- an instance of Country
-
getCountriesList
public static java.util.List<Country> getCountriesList()
Load the data of all the country objects and returns them as a list- Returns:
- the list which contains the data of all the country objects
-
getCountriesListByName
public static java.util.List<Country> getCountriesListByName(java.lang.String strSearch, java.util.Date dateRef)
Load the data of all the country objects and returns them as a list- Returns:
- the list which contains the data of all the country objects
-
getIdCountriesList
public static java.util.List<java.lang.Integer> getIdCountriesList(java.lang.String countryLabel, java.lang.String countryCode)Load the id of all the country objects and returns them as a list- Returns:
- the list which contains the id of all the country objects
-
getCountriesReferenceList
public static fr.paris.lutece.util.ReferenceList getCountriesReferenceList()
Load the data of all the country objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the country objects
-
getCountriesListByIds
public static java.util.List<Country> getCountriesListByIds(java.util.List<java.lang.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
-
-