Class CategoryService


  • public final class CategoryService
    extends java.lang.Object
    Service class for the category
    Author:
    Laurent Payen
    • Method Detail

      • findAllCategories

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

        public static void removeCategory​(int nIdCategory)
        Remove a category
        Parameters:
        nIdCategory - the id of the category to remove
      • saveCategory

        public static Category saveCategory​(Category category)
        Create a category
        Parameters:
        category - the category to store
      • findCategoryById

        public static Category findCategoryById​(int nIdCategory)
        Find a category by its primary key
        Parameters:
        nIdCategory - the id of the category
        Returns:
        the category
      • updateCategory

        public static void updateCategory​(Category category)
        Update a category
        Parameters:
        category - the category to update
      • findAllInReferenceList

        public static fr.paris.lutece.util.ReferenceList findAllInReferenceList()
        Build a list of all the category (id, label) + an empty line for the form creation
        Returns:
        the reference list