?? baseaccount.java
字號:
package com.REP.bean.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the account table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="account"
*/
public abstract class BaseAccount implements Serializable {
public static String REF = "Account";
public static String PROP_LOGIN_NAME = "LoginName";
public static String PROP_EMPLOYEE = "employee";
public static String PROP_OVERDRAW_NUMBER = "OverdrawNumber";
public static String PROP_ID = "Id";
public static String PROP_BALANCE = "Balance";
// 構造方法
public BaseAccount () {
initialize();
}
/**
* 主鍵作為參數的構造方法
*/
public BaseAccount (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* 各個屬性作為參數的構造方法
*/
public BaseAccount (
java.lang.Integer id,
com.REP.bean.Employee employee,
java.lang.String loginName) {
this.setId(id);
this.setEmployee(employee);
this.setLoginName(loginName);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// 主鍵
private java.lang.Integer id;
// 屬性
private java.lang.String loginName;
private java.math.BigDecimal balance;
private java.lang.Integer overdrawNumber;
// Employee對象
private com.REP.bean.Employee employee;
public java.lang.Integer getId () {
return id;
}
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
public java.lang.String getLoginName () {
return loginName;
}
public void setLoginName (java.lang.String loginName) {
this.loginName = loginName;
}
public java.math.BigDecimal getBalance () {
return balance;
}
public void setBalance (java.math.BigDecimal balance) {
this.balance = balance;
}
public java.lang.Integer getOverdrawNumber () {
return overdrawNumber;
}
public void setOverdrawNumber (java.lang.Integer overdrawNumber) {
this.overdrawNumber = overdrawNumber;
}
public com.REP.bean.Employee getEmployee () {
return employee;
}
public void setEmployee (com.REP.bean.Employee employee) {
this.employee = employee;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.REP.bean.Account)) return false;
else {
com.REP.bean.Account account = (com.REP.bean.Account) obj;
if (null == this.getId() || null == account.getId()) return false;
else return (this.getId().equals(account.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 + -