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
ShipmentService
create
in interface ShipmentService
shipment
- Shipment to be createdServiceException
- when there are any unexpected problemspublic void delete(Shipment shipment) throws ServiceException
ShipmentService
delete
in interface ShipmentService
shipment
- Shipment to be deletedServiceException
- when there are any unexpected problemspublic void update(Shipment shipment) throws ServiceException
ShipmentService
update
in interface ShipmentService
shipment
- Shipment to be updatedServiceException
- when there are any unexpected problemspublic Shipment getById(long id)
ShipmentService
getById
in interface ShipmentService
id
- Id of shipmentpublic List<Shipment> getAllShipments()
ShipmentService
getAllShipments
in interface ShipmentService
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.