@Transactional(rollbackFor=java.lang.Exception.class) public final class PurchaseService extends fr.paris.lutece.plugins.stock.service.impl.AbstractService implements IPurchaseService
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_ERROR_PURCHASE_QUANTITY_OFFER
The Constant MESSAGE_ERROR_PURCHASE_QUANTITY_OFFER.
|
static String |
MESSAGE_ERROR_PURCHASE_QUANTITY_OFFER_TYPE
The Constant MESSAGE_ERROR_PURCHASE_QUANTITY_OFFER_TYPE.
|
static String |
MESSAGE_ERROR_PURCHASE_SESSION_EXPIRED
The Constant MESSAGE_ERROR_PURCHASE_SESSION_EXPIRED.
|
static String |
MESSAGE_ERROR_PURCHASE_UNAVAILABLE
The Constant MESSAGE_ERROR_PURCHASE_UNAVAILABLE.
|
static String |
RESOURCE_TYPE
The Constant RESOURCE_TYPE.
|
static String |
RIGHT_MANAGE_OFFRES
The Constant RIGHT_MANAGE_OFFRES.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doCancelPurchaseList(List<ReservationDTO> bookingList,
String sessionId)
Release a list of reservation.
|
void |
doDeletePurchase(int nIdPurchase)
Delete a reservation.
|
ReservationDTO |
doSavePurchase(ReservationDTO purchaseDTO,
String sessionId)
Modifies a reservation.
|
List<ReservationDTO> |
doSavePurchaseList(List<ReservationDTO> bookingList,
String sessionId)
Save a list of reservation.
|
List<ReservationDTO> |
findAll()
Find all.
|
fr.paris.lutece.plugins.stock.commons.ResultList<ReservationDTO> |
findByFilter(fr.paris.lutece.plugins.stock.business.purchase.PurchaseFilter filter)
Find by filter without pagination properties.
|
fr.paris.lutece.plugins.stock.commons.ResultList<ReservationDTO> |
findByFilter(fr.paris.lutece.plugins.stock.business.purchase.PurchaseFilter filter,
fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
Find by filter.
|
ReservationDTO |
findById(Integer nIdPurchase)
Return an purchase by his id.
|
Integer |
getNumberOfReservationByIdProductAndUserName(Integer id,
Integer idOfferGenre,
String userName)
Return the number of reservation for an offer and an agent.
|
void |
init()
Init this service.
|
void |
update(ReservationDTO purchase)
Update.
|
public static final String RIGHT_MANAGE_OFFRES
public static final String RESOURCE_TYPE
public static final String MESSAGE_ERROR_PURCHASE_QUANTITY_OFFER
public static final String MESSAGE_ERROR_PURCHASE_UNAVAILABLE
public static final String MESSAGE_ERROR_PURCHASE_QUANTITY_OFFER_TYPE
public static final String MESSAGE_ERROR_PURCHASE_SESSION_EXPIRED
public void init()
init in interface IPurchaseServicepublic ReservationDTO doSavePurchase(ReservationDTO purchaseDTO, String sessionId)
doSavePurchase in interface IPurchaseServicepurchaseDTO - The reservation to modify in databasesessionId - the session idpublic List<ReservationDTO> doSavePurchaseList(List<ReservationDTO> bookingList, String sessionId)
doSavePurchaseList in interface IPurchaseServicebookingList - list of reservationsessionId - the session idpublic Integer getNumberOfReservationByIdProductAndUserName(Integer id, Integer idOfferGenre, String userName)
getNumberOfReservationByIdProductAndUserName in interface IPurchaseServiceid - offer ididOfferGenre - the id offer genreuserName - agent userNamepublic void doDeletePurchase(int nIdPurchase)
doDeletePurchase in interface IPurchaseServicenIdPurchase - the identifier of the reservation to deletepublic void update(ReservationDTO purchase)
update in interface IPurchaseServicepurchase - the purchasepublic fr.paris.lutece.plugins.stock.commons.ResultList<ReservationDTO> findByFilter(fr.paris.lutece.plugins.stock.business.purchase.PurchaseFilter filter, fr.paris.lutece.plugins.stock.commons.dao.PaginationProperties paginationProperties)
IPurchaseServicefindByFilter in interface IPurchaseServicefilter - the filterpaginationProperties - the pagination propertiespublic fr.paris.lutece.plugins.stock.commons.ResultList<ReservationDTO> findByFilter(fr.paris.lutece.plugins.stock.business.purchase.PurchaseFilter filter)
IPurchaseServicefindByFilter in interface IPurchaseServicefilter - the filterpublic List<ReservationDTO> findAll()
findAll in interface IPurchaseServicepublic ReservationDTO findById(Integer nIdPurchase)
findById in interface IPurchaseServicenIdPurchase - purchase idpublic void doCancelPurchaseList(List<ReservationDTO> bookingList, String sessionId)
doCancelPurchaseList in interface IPurchaseServicebookingList - the booking listsessionId - the session idCopyright © 2020 City of Paris. All rights reserved.