본문 바로가기
Develop/Spring

[2-2.영속계층, 비즈니스계층]1.BoardVO 작성

by jaekk 2018. 8. 18.

1. BoardVO작성

테이블의 구조화를 객체화 시킴


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package domain;
 
import java.util.Date;
 
public class BoardVO {
    private Integer bno;
    private String title;
    private String content;
    private String writer;
    private Date regdate;
    private int viewcnt;
 
    public BoardVO() {
        super();
        // TODO Auto-generated constructor stub
    }
 
    public BoardVO(Integer bno, String title, String content, String wirterr, Date regdate, int viewcnt) {
        super();
        this.bno = bno;
        this.title = title;
        this.content = content;
        this.writer = writer;
        this.regdate = regdate;
        this.viewcnt = viewcnt;
    }
 
    public Integer getBno() {
        return bno;
    }
 
    public void setBno(Integer bno) {
        this.bno = bno;
    }
 
    public String getTitle() {
        return title;
    }
 
    public void setTitle(String title) {
        this.title = title;
    }
 
    public String getContent() {
        return content;
    }
 
    public void setContent(String content) {
        this.content = content;
    }
 
    public String getWriter() {
        return writer;
    }
 
    public void setWriter(String writer) {
        this.writer = writer;
    }
 
    public Date getRegdate() {
        return regdate;
    }
 
    public void setRegdate(Date regdate) {
        this.regdate = regdate;
    }
 
    public int getViewcnt() {
        return viewcnt;
    }
 
    public void setViewcnt(int viewcnt) {
        this.viewcnt = viewcnt;
    }
 
    @Override
    public String toString() {
        return "BoardVO [bno=" + bno + ", title=" + title + ", content=" + content + ", writer=" + writer + ", regdate="
                + regdate + ", viewcnt=" + viewcnt + "]";
    }
 
    
}
 
cs








※ 본 게시글은 코드로 배우는 스프링 웹 프로젝트 책을 참고하여 작성하였습니다.



댓글