Class CategoryHome
java.lang.Object
fr.paris.lutece.plugins.crm.business.demand.category.CategoryHome
This class provides instances management methods (create, find, ...) for Category objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic intCreate an instance of the category classstatic CategoryfindByCode(String code) Find by codestatic CategoryfindByPrimaryKey(int nKey) Returns an instance of a category whose identifier is specified in parameterstatic CategoryFind the first categorystatic fr.paris.lutece.util.ReferenceListLoad the data of all the category objects and returns them in form of a ReferenceListstatic Collection<Category>Load the data of all the category objects and returns them in form of a collectionstatic intGenerates a new primary keystatic voidremove(int nCategoryId) Remove the category whose identifier is specified in parameterstatic CategoryUpdate of the category which is specified in parameter
-
Method Details
-
newPrimaryKey
public static int newPrimaryKey()Generates a new primary key- Returns:
- The new primary key
-
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 nCategoryId) Remove the category whose identifier is specified in parameter- Parameters:
nCategoryId- The category 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 category objects and returns them in form of a collection- Returns:
- the collection which contains the data of all the category objects
-
getCategories
public static fr.paris.lutece.util.ReferenceList getCategories()Load the data of all the category objects and returns them in form of a ReferenceList- Returns:
- the ReferenceList which contains the data of all the category objects
-
findFirstCategory
Find the first category- Returns:
- a
Category
-
findByCode
Find by code- Returns:
- a
Category
-