fr.paris.lutece.plugins.stock.modules.tickets.business
Class ShowDAO

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,fr.paris.lutece.plugins.stock.business.product.Product>
              extended by fr.paris.lutece.plugins.stock.business.product.ProductDAO<java.lang.Integer,fr.paris.lutece.plugins.stock.business.product.Product>
                  extended by fr.paris.lutece.plugins.stock.modules.tickets.business.ShowDAO
All Implemented Interfaces:
fr.paris.lutece.plugins.stock.business.product.IProductDAO, fr.paris.lutece.plugins.stock.commons.dao.IStockDAO<java.lang.Integer,fr.paris.lutece.plugins.stock.business.product.Product>, IShowDAO, fr.paris.lutece.util.jpa.IGenericDAO<java.lang.Integer,fr.paris.lutece.plugins.stock.business.product.Product>

public class ShowDAO
extends fr.paris.lutece.plugins.stock.business.product.ProductDAO<java.lang.Integer,fr.paris.lutece.plugins.stock.business.product.Product>
implements IShowDAO

Specific Data Access methods

Author:
abataille

Constructor Summary
ShowDAO()
           
 
Method Summary
protected  void buildCriteriaQuery(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter, javax.persistence.criteria.Root<fr.paris.lutece.plugins.stock.business.product.Product> root, javax.persistence.criteria.CriteriaQuery<fr.paris.lutece.plugins.stock.business.product.Product> query, javax.persistence.criteria.CriteriaBuilder builder)
          Build the criteria query from the filter
protected  void buildSortQuery(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter, javax.persistence.criteria.Root<fr.paris.lutece.plugins.stock.business.product.Product> root, javax.persistence.criteria.CriteriaQuery<fr.paris.lutece.plugins.stock.business.product.Product> query, javax.persistence.criteria.CriteriaBuilder builder)
          Build the sort query.
 java.util.List<fr.paris.lutece.plugins.stock.business.product.Product> getComeProduct(java.util.List<java.lang.String> orderList, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
          Gets the come product.
 java.util.List<fr.paris.lutece.plugins.stock.business.product.Product> getCurrentAndComeProduct(java.util.List<java.lang.String> orderList)
          Return a list of product with date_end after the current date.
 java.util.List<fr.paris.lutece.plugins.stock.business.product.Product> getCurrentProduct(java.util.List<java.lang.String> orderList, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
          
 
Methods inherited from class fr.paris.lutece.plugins.stock.business.product.ProductDAO
buildPredicates, findByFilter, findByFilter, getAllByName, getCountProductALAfficheByDate, getCountProductAVenirByDate, getPluginName
 
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.plugins.stock.business.product.IProductDAO
findByFilter, findByFilter, getAllByName, getCountProductALAfficheByDate, getCountProductAVenirByDate
 
Methods inherited from interface fr.paris.lutece.plugins.stock.commons.dao.IStockDAO
findAll
 
Methods inherited from interface fr.paris.lutece.util.jpa.IGenericDAO
create, detach, findAll, findById, flush, remove, update
 

Constructor Detail

ShowDAO

public ShowDAO()
Method Detail

buildCriteriaQuery

protected void buildCriteriaQuery(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter,
                                  javax.persistence.criteria.Root<fr.paris.lutece.plugins.stock.business.product.Product> root,
                                  javax.persistence.criteria.CriteriaQuery<fr.paris.lutece.plugins.stock.business.product.Product> query,
                                  javax.persistence.criteria.CriteriaBuilder builder)
Build the criteria query from the filter

Overrides:
buildCriteriaQuery in class fr.paris.lutece.plugins.stock.business.product.ProductDAO<java.lang.Integer,fr.paris.lutece.plugins.stock.business.product.Product>
Parameters:
filter - the filter
root - the category root
query - the criteria query
builder - the criteria builder

getCurrentProduct

public java.util.List<fr.paris.lutece.plugins.stock.business.product.Product> getCurrentProduct(java.util.List<java.lang.String> orderList,
                                                                                                fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)

Specified by:
getCurrentProduct in interface IShowDAO

getComeProduct

public java.util.List<fr.paris.lutece.plugins.stock.business.product.Product> getComeProduct(java.util.List<java.lang.String> orderList,
                                                                                             fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
Gets the come product.

Specified by:
getComeProduct in interface IShowDAO
Parameters:
orderList - the order list
paginator - the paginator
Returns:
the come product

getCurrentAndComeProduct

public java.util.List<fr.paris.lutece.plugins.stock.business.product.Product> getCurrentAndComeProduct(java.util.List<java.lang.String> orderList)
Return a list of product with date_end after the current date.

Specified by:
getCurrentAndComeProduct in interface IShowDAO
Parameters:
orderList - the order list
Returns:
list of product

buildSortQuery

protected void buildSortQuery(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter,
                              javax.persistence.criteria.Root<fr.paris.lutece.plugins.stock.business.product.Product> root,
                              javax.persistence.criteria.CriteriaQuery<fr.paris.lutece.plugins.stock.business.product.Product> query,
                              javax.persistence.criteria.CriteriaBuilder builder)
Build the sort query.

Overrides:
buildSortQuery in class fr.paris.lutece.plugins.stock.business.product.ProductDAO<java.lang.Integer,fr.paris.lutece.plugins.stock.business.product.Product>
Parameters:
filter - the filter
root - the product root
query - the criteria query
builder - the criteria builder


Copyright © 2012 Mairie de Paris. All Rights Reserved.