1 |
/** |
---|
2 |
* Board 객체 관련 Interface |
---|
3 |
*/ |
---|
4 |
package org.springframework.samples.kyuriboard.dao; |
---|
5 |
|
---|
6 |
import java.util.List; |
---|
7 |
|
---|
8 |
import org.springframework.dao.DataAccessException; |
---|
9 |
import org.springframework.samples.kyuriboard.domain.Board; |
---|
10 |
|
---|
11 |
/** |
---|
12 |
* @author DAMI(archy712@naver.com) |
---|
13 |
* |
---|
14 |
*/ |
---|
15 |
public interface BoardDao { |
---|
16 |
|
---|
17 |
|
---|
18 |
/** |
---|
19 |
* 주어진 게시물ID로 게시물 객체를 반환한다. |
---|
20 |
* @param boardId 게시물ID |
---|
21 |
* @return Board 게시물 객체 |
---|
22 |
* @throws DataAccessException |
---|
23 |
*/ |
---|
24 |
Board getBoardByBoardId(int boardId) throws DataAccessException; |
---|
25 |
|
---|
26 |
|
---|
27 |
/** |
---|
28 |
* 게시물의 총 리스트를 반환한다. |
---|
29 |
* @return java.util.List 게시물 총 리스트 |
---|
30 |
* @throws DataAccessException |
---|
31 |
*/ |
---|
32 |
List getBoardList() throws DataAccessException; |
---|
33 |
|
---|
34 |
|
---|
35 |
/** |
---|
36 |
* 주어진 사용자ID에 해당하는 게시물 리스트를 반환한다. |
---|
37 |
* @param userId 사용자ID |
---|
38 |
* @return java.util.List 게시물 리스트 |
---|
39 |
* @throws DataAccessException |
---|
40 |
*/ |
---|
41 |
List getBoardListByUserId(String userId) throws DataAccessException; |
---|
42 |
|
---|
43 |
|
---|
44 |
/** |
---|
45 |
* 주어진 사용자명에 해당하는 게시물 리스트를 반환한다. |
---|
46 |
* @param userName 사용자명 |
---|
47 |
* @return java.util.List 게시물 리스트 |
---|
48 |
* @throws DataAccessException |
---|
49 |
*/ |
---|
50 |
List getBoardListByUserName(String userName) throws DataAccessException; |
---|
51 |
|
---|
52 |
|
---|
53 |
/** |
---|
54 |
* 주어진 제목에 해당하는 게시물 리스트를 반환한다. |
---|
55 |
* @param title 게시물 제목 |
---|
56 |
* @return java.util.List 게시물 리스트 |
---|
57 |
* @throws DataAccessException |
---|
58 |
*/ |
---|
59 |
List getBoardListByTitle(String title) throws DataAccessException; |
---|
60 |
|
---|
61 |
|
---|
62 |
/** |
---|
63 |
* 주어진 게시물을 입력한다. |
---|
64 |
* @param board 입력할 게시물 객체 |
---|
65 |
* @throws DataAccessException |
---|
66 |
*/ |
---|
67 |
void insertBoard(Board board) throws DataAccessException; |
---|
68 |
|
---|
69 |
|
---|
70 |
/** |
---|
71 |
* 주어진 게시물을 수정한다. |
---|
72 |
* @param board 수정할 게시물 |
---|
73 |
* @throws DataAccessException |
---|
74 |
*/ |
---|
75 |
void updateBoard(Board board) throws DataAccessException; |
---|
76 |
|
---|
77 |
|
---|
78 |
/** |
---|
79 |
* 주어진 게시물을 삭제한다 |
---|
80 |
* @param boardId 삭제할 게시물 ID |
---|
81 |
* @throws DataAccessException |
---|
82 |
*/ |
---|
83 |
void deleteBoard(int boardId) throws DataAccessException; |
---|
84 |
|
---|
85 |
|
---|
86 |
|
---|
87 |
} |
---|