basehousestyle.java
来自「一个购房管理系统,JSF+Hibernate+Mssql2」· Java 代码 · 共 276 行
JAVA
276 行
package com.housesale.hibernate.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the HouseStyle table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="HouseStyle"
*/
public abstract class BaseHouseStyle implements Serializable {
public static String REF = "HouseStyle";
public static String PROP_BUILDING = "building";
public static String PROP_STYLE_ID = "styleId";
public static String PROP_PRICE = "price";
public static String PROP_IMAGE = "image";
public static String PROP_OTHERS = "others";
public static String PROP_BUILDING_AREA = "buildingArea";
public static String PROP_INSIDE_AREA = "insideArea";
public static String PROP_STYLE_NAME = "styleName";
public static String PROP_BZ = "bz";
// constructors
public BaseHouseStyle () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseHouseStyle (java.lang.Integer styleId) {
this.setStyleId(styleId);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer styleId;
// fields
private java.lang.String styleName;
private java.lang.String buildingArea;
private java.lang.String insideArea;
private java.lang.String others;
private java.lang.Long price;
private byte[] image;
private java.lang.String bz;
// many to one
private com.housesale.hibernate.Building building;
// collections
private java.util.Set<com.housesale.hibernate.House> houses;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="assigned"
* column="StyleID"
*/
public java.lang.Integer getStyleId () {
return styleId;
}
/**
* Set the unique identifier of this class
* @param styleId the new ID
*/
public void setStyleId (java.lang.Integer styleId) {
this.styleId = styleId;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: StyleName
*/
public java.lang.String getStyleName () {
return styleName;
}
/**
* Set the value related to the column: StyleName
* @param styleName the StyleName value
*/
public void setStyleName (java.lang.String styleName) {
this.styleName = styleName;
}
/**
* Return the value associated with the column: BuildingArea
*/
public java.lang.String getBuildingArea () {
return buildingArea;
}
/**
* Set the value related to the column: BuildingArea
* @param buildingArea the BuildingArea value
*/
public void setBuildingArea (java.lang.String buildingArea) {
this.buildingArea = buildingArea;
}
/**
* Return the value associated with the column: InsideArea
*/
public java.lang.String getInsideArea () {
return insideArea;
}
/**
* Set the value related to the column: InsideArea
* @param insideArea the InsideArea value
*/
public void setInsideArea (java.lang.String insideArea) {
this.insideArea = insideArea;
}
/**
* Return the value associated with the column: Others
*/
public java.lang.String getOthers () {
return others;
}
/**
* Set the value related to the column: Others
* @param others the Others value
*/
public void setOthers (java.lang.String others) {
this.others = others;
}
/**
* Return the value associated with the column: Price
*/
public Long getPrice () {
return price;
}
/**
* Set the value related to the column: Price
* @param price the Price value
*/
public void setPrice (Long price) {
this.price = price;
}
/**
* Return the value associated with the column: Image
*/
public byte[] getImage () {
return image;
}
/**
* Set the value related to the column: Image
* @param image the Image value
*/
public void setImage (byte[] image) {
this.image = image;
}
/**
* 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: BuildingID
*/
public com.housesale.hibernate.Building getBuilding () {
return building;
}
/**
* Set the value related to the column: BuildingID
* @param building the BuildingID value
*/
public void setBuilding (com.housesale.hibernate.Building building) {
this.building = building;
}
/**
* Return the value associated with the column: houses
*/
public java.util.Set<com.housesale.hibernate.House> getHouses () {
return houses;
}
/**
* Set the value related to the column: houses
* @param houses the houses value
*/
public void setHouses (java.util.Set<com.housesale.hibernate.House> houses) {
this.houses = houses;
}
public void addTohouses (com.housesale.hibernate.House house) {
if (null == getHouses()) setHouses(new java.util.TreeSet<com.housesale.hibernate.House>());
getHouses().add(house);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.housesale.hibernate.HouseStyle)) return false;
else {
com.housesale.hibernate.HouseStyle houseStyle = (com.housesale.hibernate.HouseStyle) obj;
if (null == this.getStyleId() || null == houseStyle.getStyleId()) return false;
else return (this.getStyleId().equals(houseStyle.getStyleId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getStyleId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getStyleId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?