Class FavoriteHome
- java.lang.Object
-
- fr.paris.lutece.plugins.mydashboard.modules.favorites.business.FavoriteHome
-
public final class FavoriteHome extends java.lang.ObjectThis 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 java.util.List<Favorite>getActivatedFavoritesList()Load the data of all the activated favorite objects and returns them as a liststatic java.util.List<Favorite>getActivatedFavoritesListByCode(java.lang.String strCategoryCode)static java.util.List<Favorite>getFavoritesList()Load the data of all the favorite objects and returns them as a liststatic java.util.List<Favorite>getFavoritesListByCategoryCode(java.lang.String strCategoryCode)Return the number of favorite for one id remote and one provider namestatic java.util.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 java.util.List<java.lang.Integer>getIdFavoritesList()Load the id of all the favorite objects and returns them as a liststatic intgetNumberFavoriteProviderRemoteId(java.lang.String strProviderName, java.lang.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 java.util.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 java.util.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 java.util.List<java.lang.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(java.lang.String strProviderName, java.lang.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 java.util.List<Favorite> getFavoritesListDefault()
Get the default favorites list- Returns:
- the default favorites list
-
getFavoritesListByCategoryCode
public static java.util.List<Favorite> getFavoritesListByCategoryCode(java.lang.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
-
getActivatedFavoritesListByCode
public static java.util.List<Favorite> getActivatedFavoritesListByCode(java.lang.String strCategoryCode)
-
-