fr.paris.lutece.plugins.stock.modules.tickets.service
Class ShowService

java.lang.Object
  extended by fr.paris.lutece.plugins.stock.service.impl.AbstractService
      extended by fr.paris.lutece.plugins.stock.service.ProductService
          extended by fr.paris.lutece.plugins.stock.modules.tickets.service.ShowService
All Implemented Interfaces:
IShowService, fr.paris.lutece.plugins.stock.service.IProductService

public class ShowService
extends fr.paris.lutece.plugins.stock.service.ProductService
implements IShowService

ProductService


Field Summary
static java.lang.String ID_SPRING_DEFAULT
           
 
Constructor Summary
ShowService()
           
 
Method Summary
 void doDeleteProduct(int nIdProduct)
          Delete the product.
 ShowDTO doSaveProduct(ShowDTO product, java.io.File[] filePosterArray)
          Modifies a product.
 java.util.List<ShowDTO> findAll()
          Return a list of all products.
 java.util.List<ShowDTO> findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter)
          Return a filtered list of product.
 fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
          Return a filtered list of product
 ShowDTO findById(java.lang.Integer nIdProduct)
          Find by id.
 fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> getAllProduct(fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
          Return a list of products
 java.util.List<ShowDTO> getComeProduct(java.util.List<java.lang.String> ordList, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
          Return a list of product with date_start after the current date.
 java.util.List<ShowDTO> getCurrentAndComeProduct(java.util.List<java.lang.String> orderList)
          Return a list of product with date_end after the current date.
 java.util.List<ShowDTO> getCurrentProduct(java.util.List<java.lang.String> orderList, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
          Return a list of products with date_end after the current date.
 byte[] getImage(java.lang.Integer idProduct)
          Gets the image data.
 ShowDTO getProduct(int nIdProduct)
          Return the product object.
 byte[] getTbImage(java.lang.Integer idProduct)
          Gets the thumbnail image.
 void init()
          Init the product service and register it in the global product service.
 void updateProduct(ShowDTO product)
          
 
Methods inherited from class fr.paris.lutece.plugins.stock.service.ProductService
getAllProduct
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_SPRING_DEFAULT

public static final java.lang.String ID_SPRING_DEFAULT
See Also:
Constant Field Values
Constructor Detail

ShowService

public ShowService()
Method Detail

init

public void init()
Init the product service and register it in the global product service.

Specified by:
init in interface IShowService

doDeleteProduct

public void doDeleteProduct(int nIdProduct)
Delete the product.

Specified by:
doDeleteProduct in interface IShowService
Parameters:
nIdProduct - the id of the product to delete

getProduct

public ShowDTO getProduct(int nIdProduct)
Return the product object.

Specified by:
getProduct in interface IShowService
Parameters:
nIdProduct - the product id
Returns:
the product

findByFilter

public java.util.List<ShowDTO> findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter)
Return a filtered list of product.

Specified by:
findByFilter in interface IShowService
Parameters:
filter - the product filter
Returns:
list of product

updateProduct

@Transactional(readOnly=false,
               propagation=REQUIRES_NEW)
public void updateProduct(ShowDTO product)


findByFilter

public fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> findByFilter(fr.paris.lutece.plugins.stock.business.product.ProductFilter filter,
                                                                              fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Return a filtered list of product

Specified by:
findByFilter in interface IShowService
Parameters:
filter - the product filter
paginationProperties - the pagination properties
Returns:
list of product

doSaveProduct

@Transactional(readOnly=false,
               propagation=REQUIRES_NEW)
public ShowDTO doSaveProduct(ShowDTO product,
                                           java.io.File[] filePosterArray)
                      throws fr.paris.lutece.plugins.stock.commons.exception.ValidationException
Modifies a product.

Specified by:
doSaveProduct in interface IShowService
Parameters:
product - The product to modify in database
filePosterArray - files poster
Returns:
the product
Throws:
fr.paris.lutece.plugins.stock.commons.exception.ValidationException

findById

public ShowDTO findById(java.lang.Integer nIdProduct)
Find by id.

Specified by:
findById in interface IShowService
Parameters:
nIdProduct - the n id product
Returns:
the show dto

getAllProduct

public fr.paris.lutece.plugins.stock.commons.ResultList<ShowDTO> getAllProduct(fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Return a list of products

Specified by:
getAllProduct in interface IShowService
Parameters:
paginationProperties - the pagination properties
Returns:
list of product

findAll

public java.util.List<ShowDTO> findAll()
Return a list of all products.

Specified by:
findAll in interface IShowService
Returns:
list of product

getCurrentProduct

public java.util.List<ShowDTO> getCurrentProduct(java.util.List<java.lang.String> orderList,
                                                 fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
Return a list of products with date_end after the current date.

Specified by:
getCurrentProduct in interface IShowService
Parameters:
orderList - the list of orders
paginator - the paginator
Returns:
list of product

getComeProduct

public java.util.List<ShowDTO> getComeProduct(java.util.List<java.lang.String> ordList,
                                              fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginator)
Return a list of product with date_start after the current date.

Specified by:
getComeProduct in interface IShowService
Parameters:
ordList - the order list
paginator - the paginator
Returns:
list of product

getCurrentAndComeProduct

public java.util.List<ShowDTO> 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 IShowService
Parameters:
orderList - the order list
Returns:
list of product

getImage

public byte[] getImage(java.lang.Integer idProduct)
Gets the image data.

Specified by:
getImage in interface IShowService
Parameters:
idProduct - the id product
Returns:
the image

getTbImage

public byte[] getTbImage(java.lang.Integer idProduct)
Gets the thumbnail image.

Specified by:
getTbImage in interface IShowService
Parameters:
idProduct - the id product
Returns:
the tb image


Copyright © 2012 Mairie de Paris. All Rights Reserved.