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 Details

    • 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 name
      strRemoteId - the favorite remote id
      plugin - 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
    • getActivatedFavoritesListByCode

      public static List<Favorite> getActivatedFavoritesListByCode(String strCategoryCode)