public class ShipmentFacadeImpl extends Object implements ShipmentFacade
Constructor and Description |
---|
ShipmentFacadeImpl(ShipmentService shipmentService,
ItemService itemService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Shipment |
addShipment(long ean,
Date date,
int arrived)
Creates a new shipment, does not store it in db
|
List<Shipment> |
getAllShipments()
Get all shipments
|
Shipment |
storeShipmentInDb(Shipment s)
Actually stores correctly created shipment in the db
|
public ShipmentFacadeImpl(ShipmentService shipmentService, ItemService itemService)
shipmentService
- shipmentServiceitemService
- itemServicepublic Shipment addShipment(long ean, Date date, int arrived) throws EntityDoesNotExistException
ShipmentFacade
addShipment
in interface ShipmentFacade
ean
- ean of item that was shippeddate
- date when shipment arrivedarrived
- how many items arrivedEntityDoesNotExistException
- when item does not existpublic Shipment storeShipmentInDb(Shipment s) throws ServiceException
ShipmentFacade
storeShipmentInDb
in interface ShipmentFacade
s
- shipment to be storedServiceException
- if something goes wrong on the db layer and service layer cannot deal with itpublic List<Shipment> getAllShipments()
ShipmentFacade
getAllShipments
in interface ShipmentFacade
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.