public class SaleServiceImpl extends Object implements SaleService
| Constructor and Description |
|---|
SaleServiceImpl(SaleRepository saleRepository)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
long |
create(Sale sale)
Creates new sale
|
void |
delete(Sale sale)
Deletes sale
|
List<Sale> |
getByFilter(SaleFilter filter)
Returns sales based on given filter
|
Sale |
getById(long id)
Return sale of given id
|
void |
update(Sale sale)
Updates sale
|
public SaleServiceImpl(SaleRepository saleRepository)
saleRepository - sale repositorypublic long create(Sale sale) throws ServiceException
SaleServicecreate in interface SaleServicesale - Sale to be createdServiceException - when there are any unexpected problemspublic void delete(Sale sale) throws ServiceException
SaleServicedelete in interface SaleServicesale - Sale to be deletedServiceException - when there are any unexpected problemspublic void update(Sale sale) throws ServiceException
SaleServiceupdate in interface SaleServicesale - Sale to be updatedServiceException - when there are any unexpected problemspublic Sale getById(long id)
SaleServicegetById in interface SaleServiceid - Id of salepublic List<Sale> getByFilter(SaleFilter filter)
SaleServicegetByFilter in interface SaleServicefilter - filter to useCopyright © 2017 Pivotal Software, Inc.. All rights reserved.