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

java.lang.Object
  extended by fr.paris.lutece.plugins.stock.service.impl.AbstractService
      extended by fr.paris.lutece.plugins.stock.service.OfferService
          extended by fr.paris.lutece.plugins.stock.modules.tickets.service.SeanceService
All Implemented Interfaces:
ISeanceService, fr.paris.lutece.plugins.stock.service.IOfferService

@Transactional(rollbackFor=java.lang.Exception.class)
public class SeanceService
extends fr.paris.lutece.plugins.stock.service.OfferService
implements ISeanceService

OfferService.


Field Summary
static String RESOURCE_TYPE
          The Constant RESOURCE_TYPE.
static String RIGHT_MANAGE_OFFRES
          The Constant RIGHT_MANAGE_OFFRES.
 
Constructor Summary
SeanceService()
           
 
Method Summary
 void checkAvailability(Integer offerId, String userName)
          Check availability.
 void doDeleteOffer(int nIdOffer)
          Delete a seance.
 void doMasseDeleteOffer(List<Integer> nIdsOffer)
          Same action as doDeleteOffer but with many offer
 void doSaveOffer(SeanceDTO offer)
          Modifies a seance.
 List<SeanceDTO> findAll()
          Find all.
 List<fr.paris.lutece.plugins.stock.business.offer.OfferGenre> findAllGenre()
          Return all the offer genre.
 fr.paris.lutece.plugins.stock.commons.ResultList<SeanceDTO> findByFilter(fr.paris.lutece.plugins.stock.business.offer.OfferFilter filter, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
          Find by filter.
 List<SeanceDTO> findSeanceByDate(Integer showId, Date dateHour)
          Find seance by date and hour.
 SeanceDTO findSeanceById(Integer nIdOffer)
          Return an offer by his id.
 List<String> findSeanceByShow(Integer showId, fr.paris.lutece.plugins.stock.business.offer.OfferFilter filter, Locale locale)
          List of seance dates for a show.
 void init()
          Init this service.
 void update(SeanceDTO offer)
          Update.
 
Methods inherited from class fr.paris.lutece.plugins.stock.service.OfferService
findById, findByProduct, getQuantity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RIGHT_MANAGE_OFFRES

public static final String RIGHT_MANAGE_OFFRES
The Constant RIGHT_MANAGE_OFFRES.

See Also:
Constant Field Values

RESOURCE_TYPE

public static final String RESOURCE_TYPE
The Constant RESOURCE_TYPE.

See Also:
Constant Field Values
Constructor Detail

SeanceService

public SeanceService()
Method Detail

init

public void init()
Init this service.

Specified by:
init in interface ISeanceService

doSaveOffer

public void doSaveOffer(SeanceDTO offer)
Modifies a seance.

Specified by:
doSaveOffer in interface ISeanceService
Parameters:
offer - The seance to modify in database

doDeleteOffer

public void doDeleteOffer(int nIdOffer)
Delete a seance.

Specified by:
doDeleteOffer in interface ISeanceService
Parameters:
nIdOffer - the identifier of the seance to delete

doMasseDeleteOffer

public void doMasseDeleteOffer(List<Integer> nIdsOffer)
Same action as doDeleteOffer but with many offer

Specified by:
doMasseDeleteOffer in interface ISeanceService
Parameters:
nIdsOffer - the list of offer which must be delete

update

public void update(SeanceDTO offer)
Update.

Specified by:
update in interface ISeanceService
Parameters:
offer - the offer

findByFilter

public fr.paris.lutece.plugins.stock.commons.ResultList<SeanceDTO> findByFilter(fr.paris.lutece.plugins.stock.business.offer.OfferFilter filter,
                                                                                fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Find by filter.

Specified by:
findByFilter in interface ISeanceService
Parameters:
filter - the filter
paginationProperties - the pagination properties
Returns:
the offer list filtered

findAll

public List<SeanceDTO> findAll()
Find all.

Specified by:
findAll in interface ISeanceService
Returns:
the list

findSeanceById

public SeanceDTO findSeanceById(Integer nIdOffer)
Return an offer by his id.

Specified by:
findSeanceById in interface ISeanceService
Parameters:
nIdOffer - offer id
Returns:
the other

findAllGenre

public List<fr.paris.lutece.plugins.stock.business.offer.OfferGenre> findAllGenre()
Return all the offer genre.

Specified by:
findAllGenre in interface ISeanceService
Returns:
the list of offer genre

findSeanceByShow

public List<String> findSeanceByShow(Integer showId,
                                     fr.paris.lutece.plugins.stock.business.offer.OfferFilter filter,
                                     Locale locale)
List of seance dates for a show.

Specified by:
findSeanceByShow in interface ISeanceService
Parameters:
showId - id of the show
filter - offer filter
locale - the locale
Returns:
list of date string

findSeanceByDate

public List<SeanceDTO> findSeanceByDate(Integer showId,
                                        Date dateHour)
Find seance by date and hour.

Specified by:
findSeanceByDate in interface ISeanceService
Parameters:
showId - the show id
dateHour - date and hour
Returns:
seance list

checkAvailability

public void checkAvailability(Integer offerId,
                              String userName)
Check availability.

Parameters:
offerId - the offer id
userName - the user name


Copyright © 2014 Mairie de Paris. All Rights Reserved.