public final class CategoryService extends Object
Modifier and Type | Method and Description |
---|---|
static List<Category> |
findAllCategories()
Find all the categories
|
static fr.paris.lutece.util.ReferenceList |
findAllInReferenceList()
Build a list of all the category (id, label) + an empty line for the form creation
|
static Category |
findCategoryById(int nIdCategory)
Find a category by its primary key
|
static void |
removeCategory(int nIdCategory)
Remove a category
|
static Category |
saveCategory(Category category)
Create a category
|
static void |
updateCategory(Category category)
Update a category
|
public static List<Category> findAllCategories()
public static void removeCategory(int nIdCategory)
nIdCategory
- the id of the category to removepublic static Category saveCategory(Category category)
category
- the category to storepublic static Category findCategoryById(int nIdCategory)
nIdCategory
- the id of the categorypublic static void updateCategory(Category category)
category
- the category to updatepublic static fr.paris.lutece.util.ReferenceList findAllInReferenceList()
Copyright © 2018 City of Paris. All rights reserved.