baseoperatorfunction.java
来自「一个购房管理系统,JSF+Hibernate+Mssql2」· Java 代码 · 共 137 行
JAVA
137 行
package com.housesale.hibernate.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the OperatorFunction table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="OperatorFunction"
*/
public abstract class BaseOperatorFunction implements Serializable {
public static String REF = "OperatorFunction";
public static String PROP_FUNCTION_ID = "functionId";
public static String PROP_OPERATOR = "operator";
public static String PROP_ID = "id";
// constructors
public BaseOperatorFunction () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseOperatorFunction (java.lang.Integer id) {
this.setId(id);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.String functionId;
// many to one
private com.housesale.hibernate.Operator operator;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="assigned"
* 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: FunctionID
*/
public java.lang.String getFunctionId () {
return functionId;
}
/**
* Set the value related to the column: FunctionID
* @param functionId the FunctionID value
*/
public void setFunctionId (java.lang.String functionId) {
this.functionId = functionId;
}
/**
* Return the value associated with the column: OperatorID
*/
public com.housesale.hibernate.Operator getOperator () {
return operator;
}
/**
* Set the value related to the column: OperatorID
* @param operator the OperatorID value
*/
public void setOperator (com.housesale.hibernate.Operator operator) {
this.operator = operator;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.housesale.hibernate.OperatorFunction)) return false;
else {
com.housesale.hibernate.OperatorFunction operatorFunction = (com.housesale.hibernate.OperatorFunction) obj;
if (null == this.getId() || null == operatorFunction.getId()) return false;
else return (this.getId().equals(operatorFunction.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 + =
减小字号Ctrl + -
显示快捷键?