Class CountryDAO
java.lang.Object
fr.paris.lutece.plugins.geocodes.business.CountryDAO
- All Implemented Interfaces:
ICountryDAO
This class provides Data Access methods for Country objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCountryChanges(Country country, String author, Date dateUpdate, 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 tableInsert a new record in the table.load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableloadByCode(String strCode, boolean bAttached, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableloadByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableselectCountriesList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a listselectCountriesListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a listselectCountriesListByValue(String strVal, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a listselectCountriesListByValueAndDate(String strVal, Date dateRef, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a listfr.paris.lutece.util.ReferenceListselectCountriesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a referenceListselectCountryChanges(int idHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns itselectCountryChangesListByCountryId(int idCountry, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a listselectIdCountriesList(fr.paris.lutece.portal.service.plugin.Plugin plugin, String countryLabel, String countryCode, boolean approximateSearch) Load the id of all the country objects and returns them as a listvoidUpdate the record in the tablestoreChanges(CountryChanges countryChanges, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns it
-
Constructor Details
-
CountryDAO
public CountryDAO()
-
-
Method Details
-
insert
Insert a new record in the table.- Specified by:
insertin interfaceICountryDAO- Parameters:
country- instance of the Country object to insertplugin- the Plugin
-
addCountryChanges
public void addCountryChanges(Country country, String author, Date dateUpdate, String status, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the history table.- Specified by:
addCountryChangesin interfaceICountryDAO- Parameters:
country- instance of the Country object to insertplugin- the Plugin
-
selectCountryChangesListByCountryId
public List<CountryChanges> selectCountryChangesListByCountryId(int idCountry, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the city objects and returns them as a list- Specified by:
selectCountryChangesListByCountryIdin interfaceICountryDAO- Parameters:
idCountry- The identifier of the City's History to getplugin- the Plugin- Returns:
- The list which contains the data of all the city objects
-
selectCountryChanges
public CountryChanges selectCountryChanges(int idHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns it- Specified by:
selectCountryChangesin interfaceICountryDAO- Parameters:
idHistory- The identifier of the CountryHistory to saveplugin- the Plugin- Returns:
- The list which contains the data of all the city objects
-
storeChanges
public CountryChanges storeChanges(CountryChanges countryChanges, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the city object and returns it- Specified by:
storeChangesin interfaceICountryDAO- Parameters:
countryChanges- The CountryHistory to updateplugin- the Plugin- Returns:
- The list which contains the data of all the city objects
-
load
Load the data from the table- Specified by:
loadin interfaceICountryDAO- Parameters:
nKey- The identifier of the countryplugin- the Plugin- Returns:
- The instance of the country
-
loadByCode
public Optional<Country> loadByCode(String strCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the table- Specified by:
loadByCodein interfaceICountryDAOplugin- the Plugin- Returns:
- The instance of the country
-
loadByCode
public Optional<Country> loadByCode(String strCode, boolean bAttached, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the table- Specified by:
loadByCodein interfaceICountryDAO- Parameters:
strCode- The identifier of the countrybAttached- is the country attachedplugin- the Plugin- Returns:
- The instance of the country
-
delete
public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the table- Specified by:
deletein interfaceICountryDAO- Parameters:
nKey- The identifier of the Country to deleteplugin- the Plugin
-
store
Update the record in the table- Specified by:
storein interfaceICountryDAO- Parameters:
country- the reference of the Countryplugin- the Plugin
-
selectCountriesList
Load the data of all the country objects and returns them as a list- Specified by:
selectCountriesListin interfaceICountryDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the data of all the country objects
-
selectCountriesListByValueAndDate
public List<Country> selectCountriesListByValueAndDate(String strVal, Date dateRef, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a list- Specified by:
selectCountriesListByValueAndDatein interfaceICountryDAOplugin- the Plugin- Returns:
- The list which contains the data of all the country objects
-
selectCountriesListByValue
public List<Country> selectCountriesListByValue(String strVal, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a list- Specified by:
selectCountriesListByValuein interfaceICountryDAOplugin- the Plugin- Returns:
- The list which contains the data of all the country objects
-
selectIdCountriesList
public List<Integer> selectIdCountriesList(fr.paris.lutece.portal.service.plugin.Plugin plugin, String countryLabel, String countryCode, boolean approximateSearch) Load the id of all the country objects and returns them as a list- Specified by:
selectIdCountriesListin interfaceICountryDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the id of all the country objects
-
selectCountriesReferenceList
public fr.paris.lutece.util.ReferenceList selectCountriesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the country objects and returns them as a referenceList- Specified by:
selectCountriesReferenceListin interfaceICountryDAO- Parameters:
plugin- the Plugin- Returns:
- The referenceList which contains the data of all the country objects
-
selectCountriesListByIds
public List<Country> selectCountriesListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a list- Specified by:
selectCountriesListByIdsin interfaceICountryDAOlistIds- liste of ids- Returns:
- The list which contains the data of all the avant objects
-