📄 user.java
字号:
package com.shunshi.ssh.entity;
import java.io.*;
/**
* User entity. @author MyEclipse Persistence Tools
*/
public class User implements Serializable {
// Fields
public static final int UNVERIFYED=1;
public static final int VERIFYED=2;
public static final int RECYCLABLE=3;
private Long id; //会员唯一标识
private UserGroup userGroup; //会员所属用户组
private Address address=new Address(); //所在地
private String userName; //会员登录名
private String password; //密码
private String contact; //联系人
private String location; //详细地址
private String postNo; //邮政编码
private String mobilephone; //移动电话
private String telephone; //固定电话
private String fax; //传真
private String email; //电子邮件
private String type; //会员类型
private Integer loginTimes; //登陆次数
private Integer state; //状态
/* 1 表示未通过审核
* 2 表示已经通过审核
* 3 表示处于回收站
*/
/** default constructor */
public User() {
}
public User(String userName, String password, String contact, String location
,String postNo, String mobilephone, String email,String telephone
,String fax){
super();
this.userName = userName;
this.password = password;
this.contact = contact;
this.location = location;
this.postNo=postNo;
this.mobilephone = mobilephone;
this.email = email;
this.telephone=telephone;
this.fax=fax;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public UserGroup getUserGroup() {
return userGroup;
}
public void setUserGroup(UserGroup userGroup) {
this.userGroup = userGroup;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
if(this.address!=null){
this.address.setUser(this);
}
}
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 getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getPostNo() {
return postNo;
}
public void setPostNo(String postNo) {
this.postNo = postNo;
}
public String getMobilephone() {
return mobilephone;
}
public void setMobilephone(String mobilephone) {
this.mobilephone = mobilephone;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getLoginTimes() {
return loginTimes;
}
public void setLoginTimes(Integer loginTimes) {
this.loginTimes = loginTimes;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((contact == null) ? 0 : contact.hashCode());
result = prime * result + ((email == null) ? 0 : email.hashCode());
result = prime * result + ((fax == null) ? 0 : fax.hashCode());
result = prime * result
+ ((location == null) ? 0 : location.hashCode());
result = prime * result
+ ((loginTimes == null) ? 0 : loginTimes.hashCode());
result = prime * result
+ ((mobilephone == null) ? 0 : mobilephone.hashCode());
result = prime * result
+ ((password == null) ? 0 : password.hashCode());
result = prime * result + ((postNo == null) ? 0 : postNo.hashCode());
result = prime * result + ((state == null) ? 0 : state.hashCode());
result = prime * result
+ ((telephone == null) ? 0 : telephone.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
result = prime * result
+ ((userName == null) ? 0 : userName.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;
User other = (User) obj;
if (contact == null) {
if (other.contact != null)
return false;
} else if (!contact.equals(other.contact))
return false;
if (email == null) {
if (other.email != null)
return false;
} else if (!email.equals(other.email))
return false;
if (fax == null) {
if (other.fax != null)
return false;
} else if (!fax.equals(other.fax))
return false;
if (location == null) {
if (other.location != null)
return false;
} else if (!location.equals(other.location))
return false;
if (loginTimes == null) {
if (other.loginTimes != null)
return false;
} else if (!loginTimes.equals(other.loginTimes))
return false;
if (mobilephone == null) {
if (other.mobilephone != null)
return false;
} else if (!mobilephone.equals(other.mobilephone))
return false;
if (password == null) {
if (other.password != null)
return false;
} else if (!password.equals(other.password))
return false;
if (postNo == null) {
if (other.postNo != null)
return false;
} else if (!postNo.equals(other.postNo))
return false;
if (state == null) {
if (other.state != null)
return false;
} else if (!state.equals(other.state))
return false;
if (telephone == null) {
if (other.telephone != null)
return false;
} else if (!telephone.equals(other.telephone))
return false;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
if (userName == null) {
if (other.userName != null)
return false;
} else if (!userName.equals(other.userName))
return false;
return true;
}
@Override
public String toString(){
return "userName="+userName+",password="+password+",state="+state
+",address="+address+",userGroup="+userGroup;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -