Class FavoriteDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.mydashboard.modules.favorites.business.FavoriteDAO
-
- All Implemented Interfaces:
IFavoriteDAO
public final class FavoriteDAO extends java.lang.Object implements IFavoriteDAO
This class provides Data Access methods for Favorite objects
-
-
Constructor Summary
Constructors Constructor Description FavoriteDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountProviderNameRemoteId(java.lang.String strProviderName, java.lang.String strRemoteId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Count the number of favorite for one provider name AND one remote id (should be 1 or 0)voiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoidinsert(Favorite favorite, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.Favoriteload(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Generates a new primary keyjava.util.List<Favorite>selectActivatedFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the activated favorite objects and returns them as a listjava.util.List<Favorite>selectCategoryCodeActivatedFavoritesList(java.lang.String strCategoryCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)java.util.List<Favorite>selectCategoryCodeFavoritesList(java.lang.String strCategoryCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the favorite provided by the category codejava.util.List<Favorite>selectDefaultFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Return the default favorites listjava.util.List<Favorite>selectFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the favorite objects and returns them as a listfr.paris.lutece.util.ReferenceListselectFavoritesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the favorite objects and returns them as a referenceListjava.util.List<java.lang.Integer>selectIdFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the id of all the favorite objects and returns them as a listjava.util.List<Favorite>selectProviderNameFavoritesList(java.lang.String strProviderName, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the favorite provided by the ProviderNamevoidstore(Favorite favorite, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the table
-
-
-
Method Detail
-
newPrimaryKey
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key- Parameters:
plugin- The Plugin- Returns:
- The new primary key
-
insert
public void insert(Favorite favorite, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.- Specified by:
insertin interfaceIFavoriteDAO- Parameters:
favorite- instance of the Favorite object to insertplugin- the Plugin
-
load
public Favorite load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table- Specified by:
loadin interfaceIFavoriteDAO- Parameters:
nKey- The identifier of the favoriteplugin- the Plugin- Returns:
- The instance of the favorite
-
delete
public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table- Specified by:
deletein interfaceIFavoriteDAO- Parameters:
nKey- The identifier of the Favorite to deleteplugin- the Plugin
-
store
public void store(Favorite favorite, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table- Specified by:
storein interfaceIFavoriteDAO- Parameters:
favorite- the reference of the Favoriteplugin- the Plugin
-
selectFavoritesList
public java.util.List<Favorite> selectFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the favorite objects and returns them as a list- Specified by:
selectFavoritesListin interfaceIFavoriteDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the data of all the favorite objects
-
selectIdFavoritesList
public java.util.List<java.lang.Integer> selectIdFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the id of all the favorite objects and returns them as a list- Specified by:
selectIdFavoritesListin interfaceIFavoriteDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the id of all the favorite objects
-
selectFavoritesReferenceList
public fr.paris.lutece.util.ReferenceList selectFavoritesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the favorite objects and returns them as a referenceList- Specified by:
selectFavoritesReferenceListin interfaceIFavoriteDAO- Parameters:
plugin- the Plugin- Returns:
- The referenceList which contains the data of all the favorite objects
-
selectActivatedFavoritesList
public java.util.List<Favorite> selectActivatedFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the activated favorite objects and returns them as a list- Specified by:
selectActivatedFavoritesListin interfaceIFavoriteDAO- Parameters:
plugin- the Plugin- Returns:
- The List which contains the data of all the activated favorite objects
-
selectProviderNameFavoritesList
public java.util.List<Favorite> selectProviderNameFavoritesList(java.lang.String strProviderName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the favorite provided by the ProviderName- Specified by:
selectProviderNameFavoritesListin interfaceIFavoriteDAO- Parameters:
strProviderName- the favorite provider nameplugin- the Plugin- Returns:
- The List which contains the data of all the activated favorite objects
-
countProviderNameRemoteId
public int countProviderNameRemoteId(java.lang.String strProviderName, java.lang.String strRemoteId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Count the number of favorite for one provider name AND one remote id (should be 1 or 0)- Specified by:
countProviderNameRemoteIdin interfaceIFavoriteDAO- Parameters:
strProviderName- the favorite provider namestrRemoteId- the favorite remote idplugin- the Plugin- Returns:
- The count of favorites corresponding to provider name and remote id given
-
selectDefaultFavoritesList
public java.util.List<Favorite> selectDefaultFavoritesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the default favorites list- Specified by:
selectDefaultFavoritesListin interfaceIFavoriteDAO- Returns:
- the list of default favorites
-
selectCategoryCodeFavoritesList
public java.util.List<Favorite> selectCategoryCodeFavoritesList(java.lang.String strCategoryCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the favorite provided by the category code- Specified by:
selectCategoryCodeFavoritesListin interfaceIFavoriteDAO- Parameters:
strCategoryCode- the category codeplugin- the Plugin- Returns:
- The List which contains the data of all the favorites filtered by the category code
-
selectCategoryCodeActivatedFavoritesList
public java.util.List<Favorite> selectCategoryCodeActivatedFavoritesList(java.lang.String strCategoryCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
selectCategoryCodeActivatedFavoritesListin interfaceIFavoriteDAO
-
-