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

📄 userinfo.java

📁 辅助办公系统,具有发布公告、站内邮箱、日程安排、日志查看等功能
💻 JAVA
字号:
package com.x3408.employees;


public class UserInfo {

	private String employeeID;

	private String name;

	private char sex;

	private String birthday;

	private String mobile;

	private String phone;

	private String department;

	private String leader;

	private boolean admin;

	private int salary;

	private String position;

	private String password;

	public UserInfo() {
	}

	public UserInfo(String pEmployeeID, String pName, String pSex,
			String pBirthday, String pMobile, String pPhone,
			String pDepartment, String pLeader, String pAdmin, String pSalary,
			String pPosition, String pPassword) {
		this.setEmployeeID(pEmployeeID);
		this.setName(pName);
		this.setSex(pSex);
		this.setBirthday(pBirthday);
		this.setMobile(pMobile);
		this.setPhone(pPhone);
		this.setDepartment(pDepartment);
		this.setLeader(pLeader);
		this.setAdmin(pAdmin);
		this.setSalary(pSalary);
		this.setPosition(pPosition);
		this.setPassword(pPassword);
	}
	public boolean isVaild(){
		if(this.employeeID==null||"".equals(this.employeeID)||employeeID.length()>6||(this.mobile!=null&&this.mobile.length()>15)
				||(this.phone!=null&&this.phone.length()>15)||(this.department!=null&&this.department.length()>10)||
				(this.leader!=null&&this.leader.length()>4)||this.password==null||this.password.equals("")||this.password.length()>15){
			return false;
		}
		return true;
	}
	public static boolean employeeIDVaild(String employeeID){
		if(employeeID==null||"".equals(employeeID.trim())||employeeID.trim().length()>6){
			return false;
		}
		return true;
	}
	public String getEmployeeID() {
		return employeeID;
	}

	public String getName() {
		return name;
	}

	public String getSex() {
		return String.valueOf(sex);
	}

	public String getBirthday() {
		return birthday;
	}

	public String getMobile() {
		return mobile;
	}

	public String getPhone() {
		return phone;
	}

	public String getDepartment() {
		return department;
	}

	public String getLeader() {
		return leader;
	}

	public boolean getAdmin() {
		return admin;
	}

	public int getSalary() {
		return salary;
	}

	public String getPosition() {
		return position;
	}

	public String getPassword() {
		return password;
	}

	public void setEmployeeID(String pEmployeeID) {
		this.employeeID =this.propertyTrim(pEmployeeID);
	}

	public void setName(String pName) {
		this.name = this.propertyTrim(pName);
	}

	public void setSex(String pSex) {
		this.sex = pSex==null?null:this.propertyTrim(pSex).charAt(0);
	}

	public void setBirthday(String pBrithday){
		this.birthday=pBrithday;
	}

	public void setMobile(String pMobile) {
		this.mobile =this.propertyTrim(pMobile);
	}

	public void setPhone(String pPhone) {
		this.phone =this.propertyTrim(pPhone);
	}

	public void setDepartment(String pDepartment) {
		this.department =this.propertyTrim(pDepartment);
	}

	public void setLeader(String pLeader) {
		this.leader = this.propertyTrim(pLeader);
	}

	public void setAdmin(String pAdmin) {
		this.admin ="1".equals(this.propertyTrim(pAdmin))? true : false;
	}

	public void setSalary(String pSalary) {
		this.salary = pSalary==null||"".equals(pSalary)?0:Integer.parseInt(pSalary);
	}

	public void setPosition(String pPosition) {
		this.position =this.propertyTrim(pPosition);
	}

	public void setPassword(String pPassword) {
		this.password = pPassword;
	}
	private String propertyTrim(String property){
		return property==null?null:property.trim();
	}
}

⌨️ 快捷键说明

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