public interface ItemService
Modifier and Type | Method and Description |
---|---|
long |
create(Item item)
Creates new item
|
void |
delete(Item item)
Deletes item
|
List<Item> |
getAllItems()
Returns list of all items
|
List<Item> |
getByCategory(Category c)
Returns all items belonging to given category
|
Item |
getByEan(long ean)
Return item of given ean
|
Item |
getById(long id)
Return item of given id
|
void |
update(Item item)
Updates item
|
long create(Item item) throws ServiceException
item
- Item to be createdServiceException
- when there are any unexpected problemsvoid update(Item item) throws ServiceException
item
- Item to be updatedServiceException
- when there are any unexpected problemsvoid delete(Item item) throws ServiceException
item
- Item to be deletedServiceException
- when there are any unexpected problemsItem getById(long id)
id
- Id of itemItem getByEan(long ean)
ean
- EAN of itemList<Item> getByCategory(Category c)
c
- categoryCopyright © 2017 Pivotal Software, Inc.. All rights reserved.