Class CategoryHome
- java.lang.Object
-
- fr.paris.lutece.plugins.document.business.category.CategoryHome
-
public final class CategoryHome extends Object
This class provides instances management methods (create, find, ...) for Category objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreate(Category category)Create 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(Category category)Update the record in the table
-
-
-
Method Detail
-
findAll
public static Collection<Category> findAll()
Returns the category list- Returns:
- Collection of Category (empty collection is no result)
-
create
public static void create(Category category)
Create a new Category- Parameters:
category- The new Category
-
find
public static Category find(int nIdCategory)
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
public static Collection<Category> findByName(String strCategoryName)
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
public static void update(Category category)
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
-
-