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
ShipmentFacadeaddShipment in interface ShipmentFacadeean - 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
ShipmentFacadestoreShipmentInDb in interface ShipmentFacades - shipment to be storedServiceException - if something goes wrong on the db layer and service layer cannot deal with itpublic List<Shipment> getAllShipments()
ShipmentFacadegetAllShipments in interface ShipmentFacadeCopyright © 2017 Pivotal Software, Inc.. All rights reserved.