2018. 7. 21. 23:51 프로그래밍/Spring
domain&dto&vo
package pms.domain;
import java.io.Serializable;
import java.sql.Date;
public class Tour implements Serializable {
private static final long serialVersionUID = 1L;
private int no;
private String title;
private String content;
private Date createdtime;
@Override
public String toString() {
return "Tour [no=" + no + ", title=" + title + ", content=" + content + ", createdDate=" + createdtime + "]";
}
public int getNo() {
return no;
}
public void setNo(int no) {
this.no = no;
}
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 Date getCreatedDate() {
return createdtime;
}
public void setCreatedDate(Date createdDate) {
this.createdtime = createdDate;
}
}
예전에 학원에서 했던 세미 프로젝트에서 사용한 것으로 보통 dto,vo라고 불리우며 domain이라고 하는 곳도 가끔 있다.
나느 DB에서 사용할 컬럼을 자바에서 사용할 수 있도록 객체(비지니스 객체 : 데이터를 실어 나르는 객체)로 선언하였지만 다른 데이터 컨트롤러나 서비스에서 공용으로 사용할 데이터를 저장하는 목적으로 많이 사용한다.