기린의 기록을 위한 공간

4. VO 본문

Programming/JDBC

4. VO

girin code 2020. 2. 21. 13:35

package com.member.model.vo;


import java.util.Date;


public class Member {

//DB에서 전송된 데이터를 담는 객체(데이터 담는 바구니)

//통상적으로 DB테이블과 똑같이 만든다

//table의 컬럼==객체의멤버변수가 일치

private String userId;

private String password;

private String userName;

private String gender;

private int age;

private String email;

private String phone;

private String address;

private String hobby;

private Date enrollDate;

public Member() {


}

public Member(String userId, String password, String userName, String gender, int age, String email, String phone,

String address, String hobby, Date enrollDate) {

super();

this.userId = userId;

this.password = password;

this.userName = userName;

this.gender = gender;

this.age = age;

this.email = email;

this.phone = phone;

this.address = address;

this.hobby = hobby;

this.enrollDate = enrollDate;

}



public String getUserId() {

return userId;

}



public void setUserId(String userId) {

this.userId = userId;

}



public String getPassword() {

return password;

}



public void setPassword(String password) {

this.password = password;

}



public String getUserName() {

return userName;

}



public void setUserName(String userName) {

this.userName = userName;

}



public String getGender() {

return gender;

}



public void setGender(String gender) {

this.gender = gender;

}



public int getAge() {

return age;

}



public void setAge(int age) {

this.age = age;

}



public String getEmail() {

return email;

}



public void setEmail(String email) {

this.email = email;

}



public String getPhone() {

return phone;

}



public void setPhone(String phone) {

this.phone = phone;

}



public String getAddress() {

return address;

}



public void setAddress(String address) {

this.address = address;

}



public String getHobby() {

return hobby;

}



public void setHobby(String hobby) {

this.hobby = hobby;

}



public Date getEnrollDate() {

return enrollDate;

}



public void setEnrollDate(Date enrollDate) {

this.enrollDate = enrollDate;

}



@Override

public String toString() {

return "Member [userId=" + userId + ", password=" + password + ", userName=" + userName + ", gender=" + gender

+ ", age=" + age + ", email=" + email + ", phone=" + phone + ", address=" + address + ", hobby=" + hobby

+ ", enrollDate=" + enrollDate + "]";

}

}


'Programming > JDBC' 카테고리의 다른 글

6.msg.jsp  (0) 2020.02.21
5.LoginServlet  (0) 2020.02.21
3.Service  (0) 2020.02.21
2.DAO  (0) 2020.02.21
1.JDBCTemplate  (0) 2020.02.21
Comments