MCPcopy Create free account
hub / github.com/castello/spring_basic / User

Class User

ch4/User.java:6–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import java.util.Objects;
5
6public class User {
7 private String id;
8 private String pwd;
9 private String name;
10 private String email;
11 private Date birth;
12 private String sns;
13 private Date reg_date;
14
15 public User(){}
16 public User(String id, String pwd, String name, String email, Date birth, String sns, Date reg_date) {
17 this.id = id;
18 this.pwd = pwd;
19 this.name = name;
20 this.email = email;
21 this.birth = birth;
22 this.sns = sns;
23 this.reg_date = reg_date;
24 }
25
26 @Override
27 public boolean equals(Object o) {
28 if (this == o) return true;
29 if (o == null || getClass() != o.getClass()) return false;
30 User user = (User) o;
31 return id.equals(user.id) && Objects.equals(pwd, user.pwd) && Objects.equals(name, user.name) && Objects.equals(email, user.email) && Objects.equals(birth, user.birth) && Objects.equals(sns, user.sns);
32 }
33
34 @Override
35 public int hashCode() {
36 return Objects.hash(id, pwd, name, email, birth, sns, reg_date);
37 }
38
39 @Override
40 public String toString() {
41 return "User{" +
42 "id='" + id + '\'' +
43 ", pwd='" + pwd + '\'' +
44 ", name='" + name + '\'' +
45 ", email='" + email + '\'' +
46 ", birth=" + birth +
47 ", sns='" + sns + '\'' +
48 ", reg_date=" + reg_date +
49 '}';
50 }
51
52 public String getId() {
53 return id;
54 }
55
56 public void setId(String id) {
57 this.id = id;
58 }
59
60 public String getPwd() {
61 return pwd;
62 }
63

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected