public class ShipmentServiceImpl extends Object implements ShipmentService
| Constructor and Description |
|---|
ShipmentServiceImpl(ShipmentRepository shipmentRepository)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
long |
create(Shipment shipment)
Creates new shipment
|
void |
delete(Shipment shipment)
Deletes shipment
|
List<Shipment> |
getAllShipments()
Get all shipments
|
Shipment |
getById(long id)
Return shipment of given id
|
void |
update(Shipment shipment)
Updates shipment
|
public ShipmentServiceImpl(ShipmentRepository shipmentRepository)
shipmentRepository - shipment repositorypublic long create(Shipment shipment) throws ServiceException
ShipmentServicecreate in interface ShipmentServiceshipment - Shipment to be createdServiceException - when there are any unexpected problemspublic void delete(Shipment shipment) throws ServiceException
ShipmentServicedelete in interface ShipmentServiceshipment - Shipment to be deletedServiceException - when there are any unexpected problemspublic void update(Shipment shipment) throws ServiceException
ShipmentServiceupdate in interface ShipmentServiceshipment - Shipment to be updatedServiceException - when there are any unexpected problemspublic Shipment getById(long id)
ShipmentServicegetById in interface ShipmentServiceid - Id of shipmentpublic List<Shipment> getAllShipments()
ShipmentServicegetAllShipments in interface ShipmentServiceCopyright © 2017 Pivotal Software, Inc.. All rights reserved.