Class CategoryHome


  • public final class CategoryHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for Category objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Category create​(Category category)
      Create an instance of the category class
      static Category findByCode​(java.lang.String code)
      Returns an instance of a category whose identifier is specified in parameter
      static Category findByPrimaryKey​(int nKey)
      Returns an instance of a category whose identifier is specified in parameter
      static java.util.List<Category> getCategoriesList()
      Load the data of all the favorite objects and returns them as a list
      static java.util.List<Category> getCategoriesListDefault()
      Get the default favorites list
      static void remove​(int nKey)
      Remove the category whose identifier is specified in parameter
      static Category update​(Category category)
      Update of the category which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static Category create​(Category category)
        Create an instance of the category class
        Parameters:
        category - The instance of the Category which contains the informations to store
        Returns:
        The instance of category which has been created with its primary key.
      • update

        public static Category update​(Category category)
        Update of the category which is specified in parameter
        Parameters:
        category - The instance of the Category which contains the data to store
        Returns:
        The instance of the category which has been updated
      • remove

        public static void remove​(int nKey)
        Remove the category whose identifier is specified in parameter
        Parameters:
        nKey - The favorite Id
      • findByPrimaryKey

        public static Category findByPrimaryKey​(int nKey)
        Returns an instance of a category whose identifier is specified in parameter
        Parameters:
        nKey - The category primary key
        Returns:
        an instance of Category
      • getCategoriesList

        public static java.util.List<Category> getCategoriesList()
        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
      • getCategoriesListDefault

        public static java.util.List<Category> getCategoriesListDefault()
        Get the default favorites list
        Returns:
        the default favorites list
      • findByCode

        public static Category findByCode​(java.lang.String code)
        Returns an instance of a category whose identifier is specified in parameter
        Parameters:
        nKey - The category primary key
        Returns:
        an instance of Category