📄 user.java
字号:
package tarena.netctoss.model;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
*用户类(用于保存用户账务帐号信息及个人信息)
* @author hongye
*
*/
public class User implements Serializable {
/**
* id 主键编码
* name 用户姓名
* loginName 用户账务帐号
* loginPassword 用户账务帐号密码
* status 账务帐号状态(0:开通;1:暂停;2:删除)
* phone 联系电话
* email email
* enrollDate 开通日期
* closeDate 暂停日期
* paymentStyle 付款方式(0:现金;1:银行转帐;2:邮局汇款;3:其他)
* career 职业
* nationality 国籍(系统中在本字段记录省份)
* sex 性别
* company 公司名称
* mailAddress 地址
* postCode 邮编
* services
*/
private Integer id;
private String name;
private String loginName;
private String loginPassword;
private String status;
private String phone;
private String email;
private Date enrollDate;
private Date closeDate;
private Integer paymentStyle;
private String career;
private String nationality;
private String sex;
private String company;
private String mailAddress;
private String postCode;
private Set<UserService> services = new HashSet<UserService>();
public User() {
super();
services = new HashSet<UserService>();
}
public String getCareer() {
return career;
}
public void setCareer(String career) {
this.career = career;
}
public Date getCloseDate() {
return closeDate;
}
public void setCloseDate(Date closeDate) {
this.closeDate = closeDate;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Date getEnrollDate() {
return enrollDate;
}
public void setEnrollDate(Date enrollDate) {
this.enrollDate = enrollDate;
}
public void setEnrollDateStr(String date){
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getLoginPassword() {
return loginPassword;
}
public void setLoginPassword(String loginPassword) {
this.loginPassword = loginPassword;
}
public String getMailAddress() {
return mailAddress;
}
public void setMailAddress(String mailAddress) {
this.mailAddress = mailAddress;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNationality() {
return nationality;
}
public void setNationality(String nationality) {
this.nationality = nationality;
}
public Integer getPaymentStyle() {
return paymentStyle;
}
public void setPaymentStyle(Integer paymentStyle) {
this.paymentStyle = paymentStyle;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPostCode() {
return postCode;
}
public void setPostCode(String postCode) {
this.postCode = postCode;
}
public Set getServices() {
return services;
}
public void setServices(Set services) {
this.services = services;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
// TODO Auto-generated method stub
return id + ":" + loginName + ":";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((email == null) ? 0 : email.hashCode());
result = prime * result
+ ((loginName == null) ? 0 : loginName.hashCode());
result = prime * result
+ ((loginPassword == null) ? 0 : loginPassword.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result
+ ((paymentStyle == null) ? 0 : paymentStyle.hashCode());
result = prime * result + ((sex == null) ? 0 : sex.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final User other = (User) obj;
if (email == null) {
if (other.email != null)
return false;
} else if (!email.equals(other.email))
return false;
if (loginName == null) {
if (other.loginName != null)
return false;
} else if (!loginName.equals(other.loginName))
return false;
if (loginPassword == null) {
if (other.loginPassword != null)
return false;
} else if (!loginPassword.equals(other.loginPassword))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (paymentStyle == null) {
if (other.paymentStyle != null)
return false;
} else if (!paymentStyle.equals(other.paymentStyle))
return false;
if (sex == null) {
if (other.sex != null)
return false;
} else if (!sex.equals(other.sex))
return false;
if (status == null) {
if (other.status != null)
return false;
} else if (!status.equals(other.status))
return false;
return true;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -