Class FavoriteHome
- java.lang.Object
-
- fr.paris.lutece.plugins.mydashboard.modules.favorites.business.FavoriteHome
-
public final class FavoriteHome extends Object
This class provides instances management methods (create, find, ...) for Favorite objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Favoritecreate(Favorite favorite)Create an instance of the favorite classstatic FavoritefindByPrimaryKey(int nKey)Returns an instance of a favorite whose identifier is specified in parameterstatic List<Favorite>getActivatedFavoritesList()Load the data of all the activated favorite objects and returns them as a liststatic List<Favorite>getActivatedFavoritesListByCode(String strCategoryCode)static List<Favorite>getFavoritesList()Load the data of all the favorite objects and returns them as a liststatic List<Favorite>getFavoritesListByCategoryCode(String strCategoryCode)Return the number of favorite for one id remote and one provider namestatic List<Favorite>getFavoritesListDefault()Get the default favorites liststatic fr.paris.lutece.util.ReferenceListgetFavoritesReferenceList()Load the data of all the favorite objects and returns them as a referenceListstatic List<Integer>getIdFavoritesList()Load the id of all the favorite objects and returns them as a liststatic intgetNumberFavoriteProviderRemoteId(String strProviderName, String strRemoteId)Return the number of favorite for one id remote and one provider namestatic voidremove(int nKey)Remove the favorite whose identifier is specified in parameterstatic Favoriteupdate(Favorite favorite)Update of the favorite which is specified in parameter
-
-
-
Method Detail
-
create
public static Favorite create(Favorite favorite)
Create an instance of the favorite class- Parameters:
favorite- The instance of the Favorite which contains the informations to store- Returns:
- The instance of favorite which has been created with its primary key.
-
update
public static Favorite update(Favorite favorite)
Update of the favorite which is specified in parameter- Parameters:
favorite- The instance of the Favorite which contains the data to store- Returns:
- The instance of the favorite which has been updated
-
remove
public static void remove(int nKey)
Remove the favorite whose identifier is specified in parameter- Parameters:
nKey- The favorite Id
-
findByPrimaryKey
public static Favorite findByPrimaryKey(int nKey)
Returns an instance of a favorite whose identifier is specified in parameter- Parameters:
nKey- The favorite primary key- Returns:
- an instance of Favorite
-
getFavoritesList
public static List<Favorite> getFavoritesList()
Load the data of all the favorite objects and returns them as a list- Returns:
- the list which contains the data of all the favorite objects
-
getActivatedFavoritesList
public static List<Favorite> getActivatedFavoritesList()
Load the data of all the activated favorite objects and returns them as a list- Returns:
- the list which contains the data of all the favorite objects
-
getIdFavoritesList
public static List<Integer> getIdFavoritesList()
Load the id of all the favorite objects and returns them as a list- Returns:
- the list which contains the id of all the favorite objects
-
getFavoritesReferenceList
public static fr.paris.lutece.util.ReferenceList getFavoritesReferenceList()
Load the data of all the favorite objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the favorite objects
-
getNumberFavoriteProviderRemoteId
public static int getNumberFavoriteProviderRemoteId(String strProviderName, String strRemoteId)
Return the number of favorite for one id remote and one provider name- Parameters:
strProviderName- the favorite provider namestrRemoteId- the favorite remote idplugin- the Plugin- Returns:
- the number of favorite for one id remote and one provider name
-
getFavoritesListDefault
public static List<Favorite> getFavoritesListDefault()
Get the default favorites list- Returns:
- the default favorites list
-
getFavoritesListByCategoryCode
public static List<Favorite> getFavoritesListByCategoryCode(String strCategoryCode)
Return the number of favorite for one id remote and one provider name- Parameters:
strCategoryCode- the category code- Returns:
- the List which contains the data of all the favorites filtered by the category code
-
-