Class CategoryService
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.service.CategoryService
-
public final class CategoryService extends java.lang.ObjectService class for the category- Author:
- Laurent Payen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<Category>findAllCategories()Find all the categoriesstatic fr.paris.lutece.util.ReferenceListfindAllInReferenceList()Build a list of all the category (id, label) + an empty line for the form creationstatic CategoryfindCategoryById(int nIdCategory)Find a category by its primary keystatic voidremoveCategory(int nIdCategory)Remove a categorystatic CategorysaveCategory(Category category)Create a categorystatic voidupdateCategory(Category category)Update a category
-
-
-
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
-
-