Class CategoryHome


  • public final class CategoryHome
    extends java.lang.Object
    This class provides instances management methods for Category objects
    Author:
    Laurent Payen
    • 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 void delete​(int nKey)
      Delete the Category whose identifier is specified in parameter
      static java.util.List<Category> findAllCategories()
      Returns all the Categories parameter
      static Category findByLabel​(java.lang.String strLabel)
      Find a category by its Label
      static Category findByPrimaryKey​(int nKey)
      Returns an instance of 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
      • delete

        public static void delete​(int nKey)
        Delete the Category whose identifier is specified in parameter
        Parameters:
        nKey - The Category Id
      • findByPrimaryKey

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

        public static java.util.List<Category> findAllCategories()
        Returns all the Categories parameter
        Returns:
        a list of all the categories
      • findByLabel

        public static Category findByLabel​(java.lang.String strLabel)
        Find a category by its Label
        Parameters:
        strLabel - the label
        Returns:
        an instance of the category