Class CategoryHome
java.lang.Object
fr.paris.lutece.plugins.document.business.category.CategoryHome
This class provides instances management methods (create, find, ...) for Category objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreate a new Categorystatic Categoryfind(int nIdCategory) Find the data of Category from the tablestatic Collection<Category>findAll()Returns the category liststatic Collection<Category>findByName(String strCategoryName) Find the data of Category from the tablestatic intfindCountIdDocuments(int nIdCategory) Find the number of documents linked to a categorystatic fr.paris.lutece.portal.service.image.ImageResourcegetImageResource(int nCategoryId) Return the image resource for the specified category idstatic voidremove(int nIdCategory) Remove a record from the tablestatic voidUpdate the record in the table
-
Method Details
-
findAll
Returns the category list- Returns:
- Collection of Category (empty collection is no result)
-
create
Create a new Category- Parameters:
category- The new Category
-
find
Find the data of Category from the table- Parameters:
nIdCategory- The id of the category- Returns:
- The Instance of the object Category of null if no category match
-
findByName
Find the data of Category from the table- Parameters:
strCategoryName- The id of the category- Returns:
- The Collection of Category (empty collection is no result)
-
remove
public static void remove(int nIdCategory) Remove a record from the table- Parameters:
nIdCategory- The identifier of the object Category
-
update
Update the record in the table- Parameters:
category- The instance of the Category to update
-
findCountIdDocuments
public static int findCountIdDocuments(int nIdCategory) Find the number of documents linked to a category- Parameters:
nIdCategory- The category id- Returns:
- count of id document
-
getImageResource
public static fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nCategoryId) Return the image resource for the specified category id- Parameters:
nCategoryId- The identifier of Category object- Returns:
- ImageResource
-