baseoperator.java
来自「一个购房管理系统,JSF+Hibernate+Mssql2」· Java 代码 · 共 198 行
JAVA
198 行
package com.housesale.hibernate.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the Operator table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="Operator"
*/
public abstract class BaseOperator implements Serializable {
public static String REF = "Operator";
public static String PROP_PASSWORD = "password";
public static String PROP_OPERATOR_ID = "operatorId";
public static String PROP_OPERATOR_NAME = "operatorName";
public static String PROP_TEL = "tel";
public static String PROP_BZ = "bz";
// constructors
public BaseOperator () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseOperator (java.lang.Integer operatorId) {
this.setOperatorId(operatorId);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer operatorId;
// fields
private java.lang.String operatorName;
private byte[] password;
private java.lang.Integer tel;
private java.lang.String bz;
// collections
private java.util.Set<com.housesale.hibernate.OperatorFunction> operatorFunctions;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="assigned"
* column="OperatorID"
*/
public java.lang.Integer getOperatorId () {
return operatorId;
}
/**
* Set the unique identifier of this class
* @param operatorId the new ID
*/
public void setOperatorId (java.lang.Integer operatorId) {
this.operatorId = operatorId;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: OperatorName
*/
public java.lang.String getOperatorName () {
return operatorName;
}
/**
* Set the value related to the column: OperatorName
* @param operatorName the OperatorName value
*/
public void setOperatorName (java.lang.String operatorName) {
this.operatorName = operatorName;
}
/**
* Return the value associated with the column: Password
*/
public byte[] getPassword () {
return password;
}
/**
* Set the value related to the column: Password
* @param password the Password value
*/
public void setPassword (byte[] password) {
this.password = password;
}
/**
* Return the value associated with the column: Tel
*/
public java.lang.Integer getTel () {
return tel;
}
/**
* Set the value related to the column: Tel
* @param tel the Tel value
*/
public void setTel (java.lang.Integer tel) {
this.tel = tel;
}
/**
* Return the value associated with the column: Bz
*/
public java.lang.String getBz () {
return bz;
}
/**
* Set the value related to the column: Bz
* @param bz the Bz value
*/
public void setBz (java.lang.String bz) {
this.bz = bz;
}
/**
* Return the value associated with the column: operatorFunctions
*/
public java.util.Set<com.housesale.hibernate.OperatorFunction> getOperatorFunctions () {
return operatorFunctions;
}
/**
* Set the value related to the column: operatorFunctions
* @param operatorFunctions the operatorFunctions value
*/
public void setOperatorFunctions (java.util.Set<com.housesale.hibernate.OperatorFunction> operatorFunctions) {
this.operatorFunctions = operatorFunctions;
}
public void addTooperatorFunctions (com.housesale.hibernate.OperatorFunction operatorFunction) {
if (null == getOperatorFunctions()) setOperatorFunctions(new java.util.TreeSet<com.housesale.hibernate.OperatorFunction>());
getOperatorFunctions().add(operatorFunction);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.housesale.hibernate.Operator)) return false;
else {
com.housesale.hibernate.Operator operator = (com.housesale.hibernate.Operator) obj;
if (null == this.getOperatorId() || null == operator.getOperatorId()) return false;
else return (this.getOperatorId().equals(operator.getOperatorId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getOperatorId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getOperatorId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?