首页>代码>Java 模拟WebQQ3.0>/WebQQ/src/com/etoak/bean/User.java
package com.etoak.bean;

import java.util.HashSet;
import java.util.Set;

public class User implements java.io.Serializable {

	private Integer id;
	private String username;
	private String password;
	private Integer status;
	private Integer verify;
	private Set<Msg> msgsForToUid = new HashSet<Msg>();
	private Set<Friend> friendsForFromUid = new HashSet<Friend>();
	private Set<Friend> friendsForToUid = new HashSet<Friend>();
	private Set<Msg> msgsForFromUid = new HashSet<Msg>();

	public User() {
	}

	public User(String username, String password, Integer status, Integer verify,
			Set<Msg> msgsForToUid, Set<Friend> friendsForFromUid,
			Set<Friend> friendsForToUid, Set<Msg> msgsForFromUid) {
		this.username = username;
		this.password = password;
		this.status = status;
		this.verify = verify;
		this.msgsForToUid = msgsForToUid;
		this.friendsForFromUid = friendsForFromUid;
		this.friendsForToUid = friendsForToUid;
		this.msgsForFromUid = msgsForFromUid;
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getverify() {
		return this.verify;
	}

	public void setverify(Integer verify) {
		this.verify = verify;
	}

	public Set<Msg> getMsgsForToUid() {
		return this.msgsForToUid;
	}

	public void setMsgsForToUid(Set<Msg> msgsForToUid) {
		this.msgsForToUid = msgsForToUid;
	}

	public Set<Friend> getFriendsForFromUid() {
		return this.friendsForFromUid;
	}

	public void setFriendsForFromUid(Set<Friend> friendsForFromUid) {
		this.friendsForFromUid = friendsForFromUid;
	}

	public Set<Friend> getFriendsForToUid() {
		return this.friendsForToUid;
	}

	public void setFriendsForToUid(Set<Friend> friendsForToUid) {
		this.friendsForToUid = friendsForToUid;
	}

	public Set<Msg> getMsgsForFromUid() {
		return this.msgsForFromUid;
	}

	public void setMsgsForFromUid(Set<Msg> msgsForFromUid) {
		this.msgsForFromUid = msgsForFromUid;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((friendsForFromUid == null) ? 0 : friendsForFromUid
						.hashCode());
		result = prime * result
				+ ((friendsForToUid == null) ? 0 : friendsForToUid.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((msgsForFromUid == null) ? 0 : msgsForFromUid.hashCode());
		result = prime * result
				+ ((msgsForToUid == null) ? 0 : msgsForToUid.hashCode());
		result = prime * result
				+ ((password == null) ? 0 : password.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result
				+ ((username == null) ? 0 : username.hashCode());
		result = prime * result + ((verify == null) ? 0 : verify.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 (friendsForFromUid == null) {
			if (other.friendsForFromUid != null)
				return false;
		} else if (!friendsForFromUid.equals(other.friendsForFromUid))
			return false;
		if (friendsForToUid == null) {
			if (other.friendsForToUid != null)
				return false;
		} else if (!friendsForToUid.equals(other.friendsForToUid))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (msgsForFromUid == null) {
			if (other.msgsForFromUid != null)
				return false;
		} else if (!msgsForFromUid.equals(other.msgsForFromUid))
			return false;
		if (msgsForToUid == null) {
			if (other.msgsForToUid != null)
				return false;
		} else if (!msgsForToUid.equals(other.msgsForToUid))
			return false;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		if (verify == null) {
			if (other.verify != null)
				return false;
		} else if (!verify.equals(other.verify))
			return false;
		return true;
	}

}
最近下载更多
luoluyan  LV1 2021年7月20日
zm8080  LV1 2021年6月29日
zaq123zaq  LV10 2020年12月21日
guaixia163  LV13 2020年7月13日
ybhybh  LV1 2020年6月8日
skk__99  LV2 2019年12月25日
卷风小白龙  LV2 2019年12月23日
lingjiawei1997  LV1 2019年11月29日
lilingzhi  LV1 2019年10月10日
edwin98666  LV2 2019年8月6日
最近浏览更多
jinling2024  LV3 2月4日
ClydeSon  LV5 2023年12月28日
hxy19991216  LV4 2023年12月20日
EFWAGGFAWGR 2023年10月19日
暂无贡献等级
漫步的海星  LV4 2023年8月28日
1WQAQW1  LV2 2023年6月12日
不止是六位数  LV7 2023年3月20日
wuziayng1232  LV10 2023年2月20日
总有人间一两风  LV8 2022年12月10日
heqian  LV16 2022年12月2日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友