Package com.example.demo.category
Class CategoryService
java.lang.Object
com.example.demo.category.CategoryService
@Service
public class CategoryService
extends java.lang.Object
카테고리와 관련된 기능들을 구현한 Service 클래스입니다.
- Version:
- main 1
- Author:
- 김평기
-
Constructor Summary
Constructors Constructor Description CategoryService() -
Method Summary
Modifier and Type Method Description voidaddCategory(Category c, int type)카테고리 추가.voiddelCategory(int id, int type)카테고리 삭제voideditCategory(int type, Category c)카테고리 수정java.util.ListgetAll(int type, int c_id)원하는 카테고리의 리스트를 받아오는 기능을 제공합니다.CategorygetCategory(int id, int type)원하는 카테고리를 받아오는 기능을 제공합니다.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CategoryService
public CategoryService()
-
-
Method Details
-
addCategory
카테고리 추가.- Parameters:
c- : 추가할 카테고리 내용을 담은 DTOtype- : 카테고리 분류
-
getAll
public java.util.List getAll(int type, int c_id)원하는 카테고리의 리스트를 받아오는 기능을 제공합니다.- Parameters:
type- 카테고리 분류c_id- 카테고리 ID- Returns:
- 받아온 리스트
-
getCategory
원하는 카테고리를 받아오는 기능을 제공합니다.- Parameters:
id- 카테고리 idtype- 카테고리 분류- Returns:
- 받아온 카테고리
-
delCategory
public void delCategory(int id, int type)카테고리 삭제- Parameters:
type- : 카테고리 분류id- : 삭제한 카테고리의 id
-
editCategory
카테고리 수정- Parameters:
type- : 카테고리 분류c- : 수정할 카테고리 내용을 담은 DTO
-