fr.paris.lutece.plugins.stock.business.category
Class CategoryDAO

java.lang.Object
  extended by fr.paris.lutece.util.jpa.JPAGenericDAO<K,E>
      extended by fr.paris.lutece.portal.service.jpa.JPALuteceDAO<K,E>
          extended by fr.paris.lutece.plugins.stock.commons.dao.AbstractStockDAO<java.lang.Integer,Category>
              extended by fr.paris.lutece.plugins.stock.business.category.CategoryDAO
All Implemented Interfaces:
ICategoryDAO, fr.paris.lutece.util.jpa.IGenericDAO<java.lang.Integer,Category>

public final class CategoryDAO
extends fr.paris.lutece.plugins.stock.commons.dao.AbstractStockDAO<java.lang.Integer,Category>
implements ICategoryDAO

This class provides Data Access methods for Person objects


Constructor Summary
CategoryDAO()
           
 
Method Summary
 fr.paris.lutece.plugins.stock.commons.ResultList<Category> findAll(java.util.List<java.lang.String> orderList)
          Find all category
 java.util.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
 java.util.List<Category> findByFilterWithChildren(CategoryFilter filter)
          Find category with children fetched by filter
 Category findByIdWithChildren(java.lang.Integer idCategory)
          Finds a category and all his subcategories and fetch children
 Category findByIdWithParent(java.lang.Integer idCategory)
          Finds a category and fetch parent
 Category findByIdWithProduct(java.lang.Integer idCategory)
          Finds a category and fetch products
 java.util.List<Category> getAllByName(java.lang.String name)
          Returns categories by name
 java.lang.String getPluginName()
          
 java.util.List<Category> selectAllChildrenWithChildrenWithProduct(java.lang.Integer idCategory)
          Finds all category's children and fetch children
 java.util.List<Category> selectAllFirstLevelWithChildrenWithProduct()
          Finds all first level categories (i.e. parent == null ) and fetch children
 
Methods inherited from class fr.paris.lutece.plugins.stock.commons.dao.AbstractStockDAO
addRestriction, createPagedQuery, findAll
 
Methods inherited from class fr.paris.lutece.portal.service.jpa.JPALuteceDAO
createNativeQuery, getEntityManagerFactory
 
Methods inherited from class fr.paris.lutece.util.jpa.JPAGenericDAO
create, detach, findAll, findById, flush, getEM, getEntityClass, getEntityClassName, remove, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.paris.lutece.util.jpa.IGenericDAO
create, detach, findAll, findById, flush, remove, update
 

Constructor Detail

CategoryDAO

public CategoryDAO()
Method Detail

getPluginName

public java.lang.String getPluginName()

Specified by:
getPluginName in class fr.paris.lutece.portal.service.jpa.JPALuteceDAO<java.lang.Integer,Category>

selectAllFirstLevelWithChildrenWithProduct

public java.util.List<Category> selectAllFirstLevelWithChildrenWithProduct()
Finds all first level categories (i.e. parent == null ) and fetch children

Specified by:
selectAllFirstLevelWithChildrenWithProduct in interface ICategoryDAO
Returns:
all first level categories

selectAllChildrenWithChildrenWithProduct

public java.util.List<Category> selectAllChildrenWithChildrenWithProduct(java.lang.Integer idCategory)
Finds all category's children and fetch children

Specified by:
selectAllChildrenWithChildrenWithProduct in interface ICategoryDAO
Parameters:
idCategory - the id of upper category
Returns:
all category's children

findByIdWithChildren

public Category findByIdWithChildren(java.lang.Integer idCategory)
Finds a category and all his subcategories and fetch children

Specified by:
findByIdWithChildren in interface ICategoryDAO
Parameters:
idCategory - the id of upper category
Returns:
the category

findByIdWithProduct

public Category findByIdWithProduct(java.lang.Integer idCategory)
Finds a category and fetch products

Specified by:
findByIdWithProduct in interface ICategoryDAO
Parameters:
idCategory - the id of the searched category
Returns:
the category

findByIdWithParent

public Category findByIdWithParent(java.lang.Integer idCategory)
Finds a category and fetch parent

Specified by:
findByIdWithParent in interface ICategoryDAO
Parameters:
idCategory - the id of the searched category
Returns:
the category

findByFilter

public fr.paris.lutece.plugins.stock.commons.ResultList<Category> findByFilter(CategoryFilter filter,
                                                                               fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Finds by filter

Specified by:
findByFilter in interface ICategoryDAO
Parameters:
filter - the filter
paginationProperties - properties for pagination
Returns:
the category list

findByFilterWithChildren

public java.util.List<Category> findByFilterWithChildren(CategoryFilter filter)
Find category with children fetched by filter

Specified by:
findByFilterWithChildren in interface ICategoryDAO
Parameters:
filter - the filter
Returns:
the category list

findByFilter

public java.util.List<Category> findByFilter(CategoryFilter filter)
Find category list by filter

Specified by:
findByFilter in interface ICategoryDAO
Parameters:
filter - the filter
Returns:
the category list

getAllByName

public java.util.List<Category> getAllByName(java.lang.String name)
Returns categories by name

Specified by:
getAllByName in interface ICategoryDAO
Parameters:
name - category name
Returns:
list of categories

findAll

public fr.paris.lutece.plugins.stock.commons.ResultList<Category> findAll(java.util.List<java.lang.String> orderList)
Find all category

Specified by:
findAll in interface ICategoryDAO
Parameters:
orderList - the order list
Returns:
list of category


Copyright © 2012 Mairie de Paris. All Rights Reserved.