You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.9 KiB
76 lines
1.9 KiB
package JaveBean;
|
|
|
|
public class User {
|
|
private String username;
|
|
private String password;
|
|
private String school;
|
|
private String sex;
|
|
private int userId;
|
|
|
|
public String getUsername() {
|
|
return username;
|
|
}
|
|
|
|
public void setUsername(String username) {
|
|
this.username = username;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
|
|
public String getSchool() {
|
|
return school;
|
|
}
|
|
|
|
public void setSchool(String school) {
|
|
this.school = school;
|
|
}
|
|
|
|
public String getSex() {
|
|
return sex;
|
|
}
|
|
|
|
public void setSex(String sex) {
|
|
this.sex = sex;
|
|
}
|
|
|
|
public int getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
public void setUserId(int userId) {
|
|
this.userId = userId;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) return true;
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
|
|
User user = (User) o;
|
|
|
|
if (userId != user.userId) return false;
|
|
if (username != null ? !username.equals(user.username) : user.username != null) return false;
|
|
if (password != null ? !password.equals(user.password) : user.password != null) return false;
|
|
if (school != null ? !school.equals(user.school) : user.school != null) return false;
|
|
if (sex != null ? !sex.equals(user.sex) : user.sex != null) return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int result = username != null ? username.hashCode() : 0;
|
|
result = 31 * result + (password != null ? password.hashCode() : 0);
|
|
result = 31 * result + (school != null ? school.hashCode() : 0);
|
|
result = 31 * result + (sex != null ? sex.hashCode() : 0);
|
|
result = 31 * result + userId;
|
|
return result;
|
|
}
|
|
}
|