⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinfo.java

📁 一些数据库的java开发编程
💻 JAVA
字号:
package jdbcbook.msgboard;

public class UserInfo
{
	// 每个用户的唯一标识,表的主键
	private int userid;
	// 用户名,所有用户不能重复
	private String username;
	// 昵称
	private String nickname;
	// 密码,用户登录系统的密码
	private String password;
	// 用户的电子邮件地址
	private String email;
	// 用户类型
	private int type;
	// 用户状态
	private int status;

	// 用户类型常量
	public static final int TYPE_USER  = 0;		// 普通用户
	public static final int TYPE_ADMIN = 1;		// 管理员

	// 用户状态常量
	public static final int STATUS_NORMAL = 0;		// 正常
	public static final int STATUS_FORBIDEN = 1;	// 禁止登录

	public int getUserID()
	{
		return this.userid;
	}
	public void setUserID( int id )
	{
		this.userid = id;
	}

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

	public String getNickname()
	{
		return this.nickname;
	}
	public void setNickname( String nickname )
	{
		this.nickname = nickname;
	}

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

	public String getEmail()
	{
		return this.email;
	}
	public void setEmail( String email )
	{
		this.email = email;
	}

	public int getType()
	{
		return this.type;
	}
	public void setType( int type )
	{
		this.type = type;
	}

	public int getStatus()
	{
		return this.status;
	}
	public void setStatus( int status )
	{
		this.status = status;
	}

	public boolean isAdmin()
	{
		return this.type == TYPE_ADMIN;
	}

	public boolean isLogon()
	{
		return this.userid>0 && this.status!=STATUS_FORBIDEN;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -