Class CategoryHome
java.lang.Object
fr.paris.lutece.plugins.mydashboard.modules.favorites.business.CategoryHome
This class provides instances management methods (create, find, ...) for Category objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic CategoryCreate an instance of the category classstatic CategoryfindByCode(String code) Returns an instance of a category whose identifier is specified in parameterstatic CategoryfindByPrimaryKey(int nKey) Returns an instance of a category whose identifier is specified in parameterLoad the data of all the favorite objects and returns them as a listGet the default favorites liststatic voidremove(int nKey) Remove the category whose identifier is specified in parameterstatic CategoryUpdate of the category which is specified in parameter
-
Method Details
-
create
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
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
-
remove
public static void remove(int nKey) Remove the category whose identifier is specified in parameter- Parameters:
nKey- The favorite Id
-
findByPrimaryKey
Returns an instance of a category whose identifier is specified in parameter- Parameters:
nKey- The category primary key- Returns:
- an instance of Category
-
getCategoriesList
Load the data of all the favorite objects and returns them as a list- Returns:
- the list which contains the data of all the favorite objects
-
getCategoriesListDefault
Get the default favorites list- Returns:
- the default favorites list
-
findByCode
Returns an instance of a category whose identifier is specified in parameter- Parameters:
nKey- The category primary key- Returns:
- an instance of Category
-