public interface CategoryService
Modifier and Type | Method and Description |
---|---|
long |
create(Category category)
Creates new category
|
void |
delete(Category category)
Deletes category
|
List<Category> |
getAllCategories()
Returns list of all categories
|
Category |
getById(long id)
Return category of given id
|
Category |
getByName(String name)
Return category of given name
|
void |
update(Category category)
Updates category
|
long create(Category category) throws ServiceException
category
- Category to be createdServiceException
- when there are any unexpected problemsvoid delete(Category category) throws ServiceException
category
- Category to be deletedServiceException
- when there are any unexpected problemsvoid update(Category category) throws ServiceException
category
- Category to be updatedServiceException
- when there are any unexpected problemsCategory getById(long id)
id
- Id of categoryCategory getByName(String name)
name
- Name of categoryCopyright © 2017 Pivotal Software, Inc.. All rights reserved.