public class CategoryService extends Object
Modifier | Constructor and Description |
---|---|
protected |
CategoryService()
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
createCategory(Category category)
Create an instance of the category class
|
Category |
findByPrimaryKey(int nIdCategory)
Returns an instance of a category whose identifier is specified in parameter
|
Category |
findFirstCategory()
Find the first category (order by the ID category)
|
fr.paris.lutece.util.ReferenceList |
getCategories(Locale locale,
boolean bAddAllCategory,
boolean bIsDefaultChoiceTop)
Load the data of all the category objects and returns them in form of a ReferenceList
|
Collection<Category> |
getCategoriesList()
Load the data of all the category objects and returns them in form of a collection
|
static CategoryService |
getService()
Get the instance of
CategoryService |
String |
removeCategory(int nIdCategory,
Locale locale)
Remove the category whose identifier is specified in parameter.
|
void |
updateCategory(Category category)
Update of the category which is specified in parameter
|
public static CategoryService getService()
CategoryService
CategoryService
public Collection<Category> getCategoriesList()
public fr.paris.lutece.util.ReferenceList getCategories(Locale locale, boolean bAddAllCategory, boolean bIsDefaultChoiceTop)
locale
- Locale
bAddAllCategory
- true if the must contain all category, false otherwisebIsDefaultChoiceTop
- true if the default choices are put at the top of the list, false otherwisepublic Category findByPrimaryKey(int nIdCategory)
nIdCategory
- The category primary keypublic int createCategory(Category category)
category
- The instance of the Category which contains the informations to storepublic String removeCategory(int nIdCategory, Locale locale)
nIdCategory
- The category Idlocale
- Locale
public void updateCategory(Category category)
category
- The instance of the Category which contains the data to storeCopyright © 2019 City of Paris. All rights reserved.