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

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

public final class CategoryDAO
extends fr.paris.lutece.portal.service.jpa.JPALuteceDAO<java.lang.Integer,Category>
implements ICategoryDAO

This class provides Data Access methods for Person objects


Constructor Summary
CategoryDAO()
           
 
Method Summary
 java.util.List<Category> findByFilter(CategoryFilter filter)
          Find category list 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.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.portal.service.jpa.JPALuteceDAO
createNativeQuery, getEntityManagerFactory
 
Methods inherited from class fr.paris.lutece.util.jpa.JPAGenericDAO
create, findAll, findById, 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, findAll, findById, 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 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

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


Copyright © 2011 Mairie de Paris. All Rights Reserved.