basehouse.java
来自「一个购房管理系统,JSF+Hibernate+Mssql2」· Java 代码 · 共 214 行
JAVA
214 行
package com.housesale.hibernate.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the House table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="House"
*/
public abstract class BaseHouse implements Serializable {
public static String REF = "House";
public static String PROP_HOUSE_NAME = "houseName";
public static String PROP_HOUSE_STYLE = "houseStyle";
public static String PROP_HOUSE_STATE = "houseState";
public static String PROP_BZ = "bz";
public static String PROP_HOUSE_ID = "houseId";
// constructors
public BaseHouse () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseHouse (java.lang.Integer houseId) {
this.setHouseId(houseId);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer houseId;
// fields
private java.lang.String houseName;
private java.lang.String houseState;
private java.lang.String bz;
// many to one
private com.housesale.hibernate.HouseStyle houseStyle;
// collections
private java.util.Set<com.housesale.hibernate.HouseCheck> houseChecks;
private java.util.Set<com.housesale.hibernate.HouseSale> houseSales;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="assigned"
* column="HouseID"
*/
public java.lang.Integer getHouseId () {
return houseId;
}
/**
* Set the unique identifier of this class
* @param houseId the new ID
*/
public void setHouseId (java.lang.Integer houseId) {
this.houseId = houseId;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: HouseName
*/
public java.lang.String getHouseName () {
return houseName;
}
/**
* Set the value related to the column: HouseName
* @param houseName the HouseName value
*/
public void setHouseName (java.lang.String houseName) {
this.houseName = houseName;
}
/**
* 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: StyleID
*/
public com.housesale.hibernate.HouseStyle getHouseStyle () {
return houseStyle;
}
/**
* Set the value related to the column: StyleID
* @param houseStyle the StyleID value
*/
public void setHouseStyle (com.housesale.hibernate.HouseStyle houseStyle) {
this.houseStyle = houseStyle;
}
/**
* Return the value associated with the column: houseChecks
*/
public java.util.Set<com.housesale.hibernate.HouseCheck> getHouseChecks () {
return houseChecks;
}
/**
* Set the value related to the column: houseChecks
* @param houseChecks the houseChecks value
*/
public void setHouseChecks (java.util.Set<com.housesale.hibernate.HouseCheck> houseChecks) {
this.houseChecks = houseChecks;
}
public void addTohouseChecks (com.housesale.hibernate.HouseCheck houseCheck) {
if (null == getHouseChecks()) setHouseChecks(new java.util.TreeSet<com.housesale.hibernate.HouseCheck>());
getHouseChecks().add(houseCheck);
}
/**
* Return the value associated with the column: houseSales
*/
public java.util.Set<com.housesale.hibernate.HouseSale> getHouseSales () {
return houseSales;
}
/**
* Set the value related to the column: houseSales
* @param houseSales the houseSales value
*/
public void setHouseSales (java.util.Set<com.housesale.hibernate.HouseSale> houseSales) {
this.houseSales = houseSales;
}
public void addTohouseSales (com.housesale.hibernate.HouseSale houseSale) {
if (null == getHouseSales()) setHouseSales(new java.util.TreeSet<com.housesale.hibernate.HouseSale>());
getHouseSales().add(houseSale);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.housesale.hibernate.House)) return false;
else {
com.housesale.hibernate.House house = (com.housesale.hibernate.House) obj;
if (null == this.getHouseId() || null == house.getHouseId()) return false;
else return (this.getHouseId().equals(house.getHouseId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getHouseId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getHouseId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
public java.lang.String getHouseState() {
return houseState;
}
public void setHouseState(java.lang.String houseState) {
this.houseState = houseState;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?