@Transactional public final class CategoryService extends Object implements ICategoryService
| Modifier and Type | Method and Description |
|---|---|
String |
doCreateCategory(fr.paris.lutece.plugins.stock.business.category.Category category)
Creates a category.
|
void |
doDeleteCategory(int nIdCategory)
Deletes a category.
|
String |
doModifyCategory(fr.paris.lutece.plugins.stock.business.category.Category category)
Modifies a category.
|
void |
doSaveCategory(fr.paris.lutece.plugins.stock.business.category.Category category)
Modifies a category.
|
List<fr.paris.lutece.plugins.stock.business.category.Category> |
findAll()
Returns all.
|
List<fr.paris.lutece.plugins.stock.business.category.Category> |
findAll(List<String> orderList)
Return all category.
|
List<fr.paris.lutece.plugins.stock.business.category.Category> |
findAllChildrenWithChildren(Integer idCategory)
Finds all category's children and fetch children.
|
List<fr.paris.lutece.plugins.stock.business.category.Category> |
findAllFirstLevelWithChildren()
Finds all categories (first level) and fetch children.
|
fr.paris.lutece.plugins.stock.commons.ResultList<fr.paris.lutece.plugins.stock.business.category.Category> |
findByFilter(fr.paris.lutece.plugins.stock.business.category.CategoryFilter filter,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Finds by filter.
|
List<fr.paris.lutece.plugins.stock.business.category.Category> |
findByFilterWithChildren(fr.paris.lutece.plugins.stock.business.category.CategoryFilter filter)
Finds by filter and fetch children.
|
fr.paris.lutece.plugins.stock.business.category.Category |
findById(Integer nIdCategory)
Find by id.
|
fr.paris.lutece.plugins.stock.business.category.Category |
findByIdWithParent(Integer nIdCategory)
Finds a category and fetch parent.
|
fr.paris.lutece.plugins.stock.business.category.Category |
findByIdWithProduct(Integer nIdCategory)
Finds a category and fetch product.
|
fr.paris.lutece.plugins.stock.business.category.Category |
findByPrimarykeyWithChildren(Integer nIdCategory)
Finds a category and all his subcategories and fetch children.
|
fr.paris.lutece.plugins.stock.business.category.Category |
getCategory(int nIdCategory)
Get the category with the given id.
|
fr.paris.lutece.plugins.stock.business.category.Category |
getCategoryWithChildren(Integer idCategory)
Finds a category and all his subcategories and fetch children.
|
fr.paris.lutece.plugins.stock.business.category.Category |
getCategoryWithParent(int nIdCategory)
Finds a category and fetch parent.
|
static CategoryService |
getInstance()
Get an instance of
CategoryService. |
void |
init()
Init the object.
|
void |
update(fr.paris.lutece.plugins.stock.business.category.Category category)
Update the category.
|
public static CategoryService getInstance()
CategoryService.CategoryServicepublic void init()
init in interface ICategoryService@Transactional public String doCreateCategory(fr.paris.lutece.plugins.stock.business.category.Category category)
doCreateCategory in interface ICategoryServicecategory - The category to create in database@Transactional public String doModifyCategory(fr.paris.lutece.plugins.stock.business.category.Category category)
doModifyCategory in interface ICategoryServicecategory - The category to modify in database@Transactional public void doDeleteCategory(int nIdCategory)
doDeleteCategory in interface ICategoryServicenIdCategory - The category id to delete in databasepublic fr.paris.lutece.plugins.stock.business.category.Category getCategory(int nIdCategory)
getCategory in interface ICategoryServicenIdCategory - The category idpublic fr.paris.lutece.plugins.stock.business.category.Category getCategoryWithParent(int nIdCategory)
getCategoryWithParent in interface ICategoryServicenIdCategory - the id of the searched categorypublic fr.paris.lutece.plugins.stock.business.category.Category getCategoryWithChildren(Integer idCategory)
getCategoryWithChildren in interface ICategoryServiceidCategory - the id of upper categorypublic List<fr.paris.lutece.plugins.stock.business.category.Category> findAllFirstLevelWithChildren()
findAllFirstLevelWithChildren in interface ICategoryServicepublic List<fr.paris.lutece.plugins.stock.business.category.Category> findAllChildrenWithChildren(Integer idCategory)
findAllChildrenWithChildren in interface ICategoryServiceidCategory - the id of upper categorypublic fr.paris.lutece.plugins.stock.business.category.Category findByPrimarykeyWithChildren(Integer nIdCategory)
findByPrimarykeyWithChildren in interface ICategoryServicenIdCategory - the id of upper categorypublic fr.paris.lutece.plugins.stock.business.category.Category findByIdWithParent(Integer nIdCategory)
findByIdWithParent in interface ICategoryServicenIdCategory - the id of the searched categorypublic fr.paris.lutece.plugins.stock.business.category.Category findByIdWithProduct(Integer nIdCategory)
findByIdWithProduct in interface ICategoryServicenIdCategory - the id of the searched categorypublic List<fr.paris.lutece.plugins.stock.business.category.Category> findByFilterWithChildren(fr.paris.lutece.plugins.stock.business.category.CategoryFilter filter)
findByFilterWithChildren in interface ICategoryServicefilter - the filterpublic fr.paris.lutece.plugins.stock.commons.ResultList<fr.paris.lutece.plugins.stock.business.category.Category> findByFilter(fr.paris.lutece.plugins.stock.business.category.CategoryFilter filter,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
findByFilter in interface ICategoryServicefilter - the filterpaginationProperties - the pagination propertiespublic List<fr.paris.lutece.plugins.stock.business.category.Category> findAll()
findAll in interface ICategoryServicepublic fr.paris.lutece.plugins.stock.business.category.Category findById(Integer nIdCategory)
findById in interface ICategoryServicenIdCategory - the n id categorypublic void update(fr.paris.lutece.plugins.stock.business.category.Category category)
update in interface ICategoryServicecategory - the categorypublic void doSaveCategory(fr.paris.lutece.plugins.stock.business.category.Category category)
throws fr.paris.lutece.plugins.stock.commons.exception.ValidationException
doSaveCategory in interface ICategoryServicecategory - The category to modify in databasefr.paris.lutece.plugins.stock.commons.exception.ValidationExceptionpublic List<fr.paris.lutece.plugins.stock.business.category.Category> findAll(List<String> orderList)
findAll in interface ICategoryServiceorderList - list of orderCopyright © 2020 City of Paris. All rights reserved.