?? baseemployee.java
字號:
package com.REP.bean.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the employee table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="employee"
*/
public abstract class BaseEmployee implements Serializable {
public static String REF = "Employee";
public static String PROP_ACCOUNT = "account";
public static String PROP_IDCARD = "Idcard";
public static String PROP_NAME = "Name";
public static String PROP_ID = "Id";
//構造方法
public BaseEmployee () {
initialize();
}
/**
* 主鍵作為參數的構造方法
*/
public BaseEmployee (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* 各個屬性作為參數的構造方法
*/
public BaseEmployee (
java.lang.Integer id,
java.lang.String name,
java.lang.String idcard) {
this.setId(id);
this.setName(name);
this.setIdcard(idcard);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// 主鍵
private java.lang.Integer id;
// 主要屬性
private java.lang.String name;
private java.lang.String idcard;
// Account對象
private com.REP.bean.Account account;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="increment"
* column="id"
*/
public java.lang.Integer getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: name
*/
public java.lang.String getName () {
return name;
}
/**
* Set the value related to the column: name
* @param name the name value
*/
public void setName (java.lang.String name) {
this.name = name;
}
/**
* Return the value associated with the column: idcard
*/
public java.lang.String getIdcard () {
return idcard;
}
/**
* Set the value related to the column: idcard
* @param idcard the idcard value
*/
public void setIdcard (java.lang.String idcard) {
this.idcard = idcard;
}
/**
* Return the value associated with the column: account
*/
public com.REP.bean.Account getAccount () {
return account;
}
/**
* Set the value related to the column: account
* @param account the account value
*/
public void setAccount (com.REP.bean.Account account) {
this.account = account;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.REP.bean.Employee)) return false;
else {
com.REP.bean.Employee employee = (com.REP.bean.Employee) obj;
if (null == this.getId() || null == employee.getId()) return false;
else return (this.getId().equals(employee.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -