?? person.java
字號:
/*
* package com.lily.dap.model.organize;
* class Person
*
* 創建日期 2006-3-3
*
* 開發者 zouxuemo
*
* 淄博百合電子有限公司版權所有
*/
package com.lily.dap.model.organize;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.lily.dap.model.BaseObject;
import com.lily.dap.model.right.RightHoldInterface;
/**
* 人員信息實體類
*
* @author zouxuemo
*
* @hibernate.class table="person"
* @hibernate.discriminator column="personType"
*/
public class Person extends BaseObject implements RightHoldInterface {
/**
* <code>serialVersionUID</code> 的注釋
*/
private static final long serialVersionUID = 7497209364294946844L;
/**
* <code>id<code> 人員id
*/
private long id = 0;
/**
* <code>username<code> 登陸用戶,添加后不能再修改
*/
private String username = "";
/**
* <code>name<code> 人員姓名
*/
private String name = "";
/**
* <code>sex<code> 性別
*/
private String sex = "";
/**
* <code>birthday<code> 出生日期
*/
private String birthday = "";
/**
* <code>mobilePhone</code> 手機號碼
*/
private String mobilePhone = "";
/**
* <code>phone</code> 常用電話號碼
*/
private String phone = "";
/**
* <code>role_id<code> 私有角色
*/
private long role_id = 0;
/**
* 備注
*/
private String des = "";
public long getPrivateRoleID() {
return role_id;
}
public void setPrivateRoleID(long role_id) {
this.role_id = role_id;
}
/**
* @return 返回 id。
*
* @hibernate.id column="id" generator-class="native" unsaved-value="0"
*
* @struts.form-field
*/
public long getId() {
return id;
}
/**
* @param id
* 要設置的 id。
*/
public void setId(long id) {
this.id = id;
}
/**
* @return 返回 username。
*
* @hibernate.property
* @hibernate.column name="username" not-null="true" length="20"
*
* @struts.form-field
*/
public String getUsername() {
return username;
}
/**
* @param username
* 要設置的 username。
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return 返回 name。
*
* @hibernate.property
* @hibernate.column name="name" not-null="true" length="50"
*
* @struts.form-field
*/
public String getName() {
return name;
}
/**
* @param name
* 要設置的 name。
*/
public void setName(String name) {
this.name = name;
}
/**
* @return 返回 des。
* @hibernate.property
* @hibernate.column name="des" sql-type="text" not-null="true"
*
* @struts.form-field
*/
public String getDes() {
return des;
}
/**
* @param des
* 要設置的 des。
*/
public void setDes(String des) {
this.des = des;
}
/**
* @return 返回 role_id。
*
* @hibernate.property
* @hibernate.column name="role_id" not-null="true"
*
* @struts.form-field
*/
public long getRole_id() {
return role_id;
}
/**
* @param role_id
* 要設置的 role_id。
*/
public void setRole_id(long role_id) {
this.role_id = role_id;
}
/**
* @return 返回 sex。
*
* @hibernate.property
* @hibernate.column name="sex" length="8"
*
* @struts.form-field
*/
public String getSex() {
return sex;
}
/**
* @param sex
* 要設置的 sex。
*/
public void setSex(String sex) {
this.sex = sex;
}
/**
* @return 返回 birthDate。
* @hibernate.property
* @hibernate.column name="birthDate" not-null="true"
*
* @struts.form-field
*/
public String getBirthday() {
return birthday;
}
/**
* @param birthDate
* 要設置的 birthDate。
*/
public void setBirthday(String birthDate) {
this.birthday = birthDate;
}
/**
* @return the mobilePhone
* @hibernate.property
* @hibernate.column name="mobilePhone" not-null="true"
*
* @struts.form-field
*/
public String getMobilePhone() {
return mobilePhone;
}
/**
* @param mobilePhone the mobilePhone to set
*/
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone;
}
/**
* @return the phone
* @hibernate.property
* @hibernate.column name="phone" not-null="true"
*
* @struts.form-field
*/
public String getPhone() {
return phone;
}
/**
* @param phone the phone to set
*/
public void setPhone(String phone) {
this.phone = phone;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(final Object other) {
if (!(other instanceof Person))
return false;
Person castOther = (Person) other;
return new EqualsBuilder().append(id, castOther.id).isEquals();
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return new HashCodeBuilder().append(id).toHashCode();
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
public String toString() {
return new ToStringBuilder(this).append("id", id).append("username",
username).append("name", name).append("role_id", role_id)
.toString();
}
public void copy(Person person) {
setId(person.getId());
setUsername(person.getUsername());
setName(person.getName());
setSex(person.getSex());
setDes(person.getDes());
setRole_id(person.getRole_id());
setBirthday(person.getBirthday());
setMobilePhone(person.getMobilePhone());
setPhone(person.getPhone());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -