?? compuser.java
字號:
package com.bean;
import org.apache.struts.action.ActionForm;
public class CompUser extends ActionForm {
private int compUserId;
private String realName;
private String department;
private String position;
private String sex;
private int delFlag;
private int isUsed;
public CompUser() {};
public void setCompUserId(int compUserId) {
this.compUserId = compUserId;
}
public int getCompUserId() {
return this.compUserId;
}
public void setRealName(String realName) {
this.realName = realName;
}
public String getRealName() {
// if(this.realName==null) this.realName="";
return this.realName;
}
public void setDepartment(String department) {
this.department = department;
// System.out.println("in compUser department!!!");
}
public String getDepartment() {
if (this.department == null)this.department = "";
return this.department;
}
public void setPosition(String position) {
this.position = position;
}
public String getPosition() {
if (this.position == null)this.position = "";
return this.position;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSex() {
if (this.sex == null)this.sex = "";
return this.sex;
}
public void setDelFlag(int delFlag) {
this.delFlag = delFlag;
}
public int getDelFlag() {
return this.delFlag;
}
public void setIsUsed(int isUsed) {
this.isUsed = isUsed;
}
public int getIsUsed() {
return this.isUsed;
}
/**
* 判斷是否同一個用戶
* @param obj Object 要比較的用戶
* @return boolean false 表示不同的用戶;true表示同一個用戶
*/
public boolean equals(Object obj) {
boolean flag = false;
if (!(obj instanceof CompUser))return false;
CompUser tmpUser = (CompUser) obj;
if (this.compUserId == tmpUser.getCompUserId() && this.compUserId > 0)return true;
if (this.department.equals(tmpUser.getDepartment()) &&
this.realName.equals(tmpUser.getRealName()) &&
this.sex.equals(tmpUser.getSex()))
return true;
return flag;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -