public final class CategoryDAO extends fr.paris.lutece.plugins.stock.commons.dao.AbstractStockDAO<Integer,Category> implements ICategoryDAO
Constructor and Description |
---|
CategoryDAO() |
Modifier and Type | Method and Description |
---|---|
fr.paris.lutece.plugins.stock.commons.ResultList<Category> |
findAll(List<String> orderList)
Find all category
|
List<Category> |
findByFilter(CategoryFilter filter)
Find category list by filter
|
fr.paris.lutece.plugins.stock.commons.ResultList<Category> |
findByFilter(CategoryFilter filter,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Finds by filter
|
List<Category> |
findByFilterWithChildren(CategoryFilter filter)
Find category with children fetched by filter
|
Category |
findByIdWithChildren(Integer idCategory)
Finds a category and all his subcategories and fetch children
|
Category |
findByIdWithParent(Integer idCategory)
Finds a category and fetch parent
|
Category |
findByIdWithProduct(Integer idCategory)
Finds a category and fetch products
|
List<Category> |
getAllByName(String name)
Returns categories by name
|
String |
getPluginName() |
List<Category> |
selectAllChildrenWithChildrenWithProduct(Integer idCategory)
Finds all category's children and fetch children
|
List<Category> |
selectAllFirstLevelWithChildrenWithProduct()
Finds all first level categories (i.e.
|
addRestriction, createPagedQuery, findAll
createNativeQuery, getEntityManagerFactory
create, detach, findAll, findById, flush, getEM, getEntityClass, getEntityClassName, remove, update
public String getPluginName()
public List<Category> selectAllFirstLevelWithChildrenWithProduct()
selectAllFirstLevelWithChildrenWithProduct
in interface ICategoryDAO
public List<Category> selectAllChildrenWithChildrenWithProduct(Integer idCategory)
selectAllChildrenWithChildrenWithProduct
in interface ICategoryDAO
idCategory
- the id of upper categorypublic Category findByIdWithChildren(Integer idCategory)
findByIdWithChildren
in interface ICategoryDAO
idCategory
- the id of upper categorypublic Category findByIdWithProduct(Integer idCategory)
findByIdWithProduct
in interface ICategoryDAO
idCategory
- the id of the searched categorypublic Category findByIdWithParent(Integer idCategory)
findByIdWithParent
in interface ICategoryDAO
idCategory
- the id of the searched categorypublic fr.paris.lutece.plugins.stock.commons.ResultList<Category> findByFilter(CategoryFilter filter, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
findByFilter
in interface ICategoryDAO
filter
- the filterpaginationProperties
- properties for paginationpublic List<Category> findByFilterWithChildren(CategoryFilter filter)
findByFilterWithChildren
in interface ICategoryDAO
filter
- the filterpublic List<Category> findByFilter(CategoryFilter filter)
findByFilter
in interface ICategoryDAO
filter
- the filterpublic List<Category> getAllByName(String name)
getAllByName
in interface ICategoryDAO
name
- category namepublic fr.paris.lutece.plugins.stock.commons.ResultList<Category> findAll(List<String> orderList)
findAll
in interface ICategoryDAO
orderList
- the order listCopyright © 2020 City of Paris. All rights reserved.