📄 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 + -