public class CategoryFacadeImpl extends Object implements CategoryFacade
| Constructor and Description |
|---|
CategoryFacadeImpl(CategoryService categoryService)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Category |
createOrUpdateCategory(String name,
String desctription)
Creates a new category, or updates it if another one with given name exist;
|
List<Category> |
getAllCategories()
Get all categories from db.
|
Category |
getCategoryByName(String name)
Find category with given name in db.
|
public CategoryFacadeImpl(CategoryService categoryService)
categoryService - categoryServicepublic Category createOrUpdateCategory(String name, String desctription) throws ServiceException
CategoryFacadecreateOrUpdateCategory in interface CategoryFacadename - name of the categorydesctription - description of the categoryServiceException - if something goes wrong on the db layer and service layer cannot deal with itpublic List<Category> getAllCategories()
CategoryFacadegetAllCategories in interface CategoryFacadepublic Category getCategoryByName(String name)
CategoryFacadegetCategoryByName in interface CategoryFacadename - name of categoryCopyright © 2017 Pivotal Software, Inc.. All rights reserved.