basecommunity.java

来自「一个购房管理系统,JSF+Hibernate+Mssql2」· Java 代码 · 共 445 行

JAVA
445
字号
package com.housesale.hibernate.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the Community table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="Community"
 */

public abstract class BaseCommunity  implements Serializable {

	public static String REF = "Community";
	public static String PROP_DEVELOPER = "developer";
	public static String PROP_TEL1 = "tel1";
	public static String PROP_PROPERTY = "property";
	public static String PROP_IMAGE2 = "image2";
	public static String PROP_IMAGE3 = "image3";
	public static String PROP_IMAGE6 = "image6";
	public static String PROP_COMMUNITY_ID = "communityId";
	public static String PROP_SELLING_AGENTS = "sellingAgents";
	public static String PROP_STATE = "state";
	public static String PROP_COMMUNITY_NAME = "communityName";
	public static String PROP_TEL2 = "tel2";
	public static String PROP_IMAGE1 = "image1";
	public static String PROP_INTRODUCE = "introduce";
	public static String PROP_IMAGE4 = "image4";
	public static String PROP_PUBLISH_TIME = "publishTime";
	public static String PROP_IMAGE5 = "image5";
	public static String PROP_ADDRESS = "address";
	public static String PROP_BZ = "bz";


	// constructors
	public BaseCommunity () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseCommunity (java.lang.Integer communityId) {
		this.setCommunityId(communityId);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer communityId;

	// fields
	private java.lang.String communityName;
	private java.lang.String address;
	private java.lang.String developer;
	private java.lang.Integer tel1;
	private java.lang.Integer tel2;
	private java.lang.String sellingAgents;
	private java.lang.String property;
	private java.util.Date publishTime;
	private java.lang.Byte state;
	private java.lang.String introduce;
	private byte[] image1;
	private byte[] image2;
	private byte[] image3;
	private byte[] image4;
	private byte[] image5;
	private byte[] image6;
	private java.lang.String bz;

	// collections
	private java.util.Set<com.housesale.hibernate.Building> buildings;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="CommunityID"
     */
	public java.lang.Integer getCommunityId () {
		return communityId;
	}

	/**
	 * Set the unique identifier of this class
	 * @param communityId the new ID
	 */
	public void setCommunityId (java.lang.Integer communityId) {
		this.communityId = communityId;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: CommunityName
	 */
	public java.lang.String getCommunityName () {
		return communityName;
	}

	/**
	 * Set the value related to the column: CommunityName
	 * @param communityName the CommunityName value
	 */
	public void setCommunityName (java.lang.String communityName) {
		this.communityName = communityName;
	}



	/**
	 * Return the value associated with the column: Address
	 */
	public java.lang.String getAddress () {
		return address;
	}

	/**
	 * Set the value related to the column: Address
	 * @param address the Address value
	 */
	public void setAddress (java.lang.String address) {
		this.address = address;
	}



	/**
	 * Return the value associated with the column: Developer
	 */
	public java.lang.String getDeveloper () {
		return developer;
	}

	/**
	 * Set the value related to the column: Developer
	 * @param developer the Developer value
	 */
	public void setDeveloper (java.lang.String developer) {
		this.developer = developer;
	}



	/**
	 * Return the value associated with the column: Tel1
	 */
	public java.lang.Integer getTel1 () {
		return tel1;
	}

	/**
	 * Set the value related to the column: Tel1
	 * @param tel1 the Tel1 value
	 */
	public void setTel1 (java.lang.Integer tel1) {
		this.tel1 = tel1;
	}



	/**
	 * Return the value associated with the column: Tel2
	 */
	public java.lang.Integer getTel2 () {
		return tel2;
	}

	/**
	 * Set the value related to the column: Tel2
	 * @param tel2 the Tel2 value
	 */
	public void setTel2 (java.lang.Integer tel2) {
		this.tel2 = tel2;
	}



	/**
	 * Return the value associated with the column: SellingAgents
	 */
	public java.lang.String getSellingAgents () {
		return sellingAgents;
	}

	/**
	 * Set the value related to the column: SellingAgents
	 * @param sellingAgents the SellingAgents value
	 */
	public void setSellingAgents (java.lang.String sellingAgents) {
		this.sellingAgents = sellingAgents;
	}



	/**
	 * Return the value associated with the column: Property
	 */
	public java.lang.String getProperty () {
		return property;
	}

	/**
	 * Set the value related to the column: Property
	 * @param property the Property value
	 */
	public void setProperty (java.lang.String property) {
		this.property = property;
	}



	/**
	 * Return the value associated with the column: PublishTime
	 */
	public java.util.Date getPublishTime () {
		return publishTime;
	}

	/**
	 * Set the value related to the column: PublishTime
	 * @param publishTime the PublishTime value
	 */
	public void setPublishTime (java.util.Date publishTime) {
		this.publishTime = publishTime;
	}



	/**
	 * Return the value associated with the column: State
	 */
	public java.lang.Byte getState () {
		return state;
	}

	/**
	 * Set the value related to the column: State
	 * @param state the State value
	 */
	public void setState (java.lang.Byte state) {
		this.state = state;
	}



	/**
	 * Return the value associated with the column: Introduce
	 */
	public java.lang.String getIntroduce () {
		return introduce;
	}

	/**
	 * Set the value related to the column: Introduce
	 * @param introduce the Introduce value
	 */
	public void setIntroduce (java.lang.String introduce) {
		this.introduce = introduce;
	}



	/**
	 * Return the value associated with the column: Image1
	 */
	public byte[] getImage1 () {
		return image1;
	}

	/**
	 * Set the value related to the column: Image1
	 * @param image1 the Image1 value
	 */
	public void setImage1 (byte[] image1) {
		this.image1 = image1;
	}



	/**
	 * Return the value associated with the column: Image2
	 */
	public byte[] getImage2 () {
		return image2;
	}

	/**
	 * Set the value related to the column: Image2
	 * @param image2 the Image2 value
	 */
	public void setImage2 (byte[] image2) {
		this.image2 = image2;
	}



	/**
	 * Return the value associated with the column: Image3
	 */
	public byte[] getImage3 () {
		return image3;
	}

	/**
	 * Set the value related to the column: Image3
	 * @param image3 the Image3 value
	 */
	public void setImage3 (byte[] image3) {
		this.image3 = image3;
	}



	/**
	 * Return the value associated with the column: Image4
	 */
	public byte[] getImage4 () {
		return image4;
	}

	/**
	 * Set the value related to the column: Image4
	 * @param image4 the Image4 value
	 */
	public void setImage4 (byte[] image4) {
		this.image4 = image4;
	}



	/**
	 * Return the value associated with the column: Image5
	 */
	public byte[] getImage5 () {
		return image5;
	}

	/**
	 * Set the value related to the column: Image5
	 * @param image5 the Image5 value
	 */
	public void setImage5 (byte[] image5) {
		this.image5 = image5;
	}



	/**
	 * Return the value associated with the column: Image6
	 */
	public byte[] getImage6 () {
		return image6;
	}

	/**
	 * Set the value related to the column: Image6
	 * @param image6 the Image6 value
	 */
	public void setImage6 (byte[] image6) {
		this.image6 = image6;
	}



	/**
	 * 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: buildings
	 */
	public java.util.Set<com.housesale.hibernate.Building> getBuildings () {
		return buildings;
	}

	/**
	 * Set the value related to the column: buildings
	 * @param buildings the buildings value
	 */
	public void setBuildings (java.util.Set<com.housesale.hibernate.Building> buildings) {
		this.buildings = buildings;
	}

	public void addTobuildings (com.housesale.hibernate.Building building) {
		if (null == getBuildings()) setBuildings(new java.util.TreeSet<com.housesale.hibernate.Building>());
		getBuildings().add(building);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.housesale.hibernate.Community)) return false;
		else {
			com.housesale.hibernate.Community community = (com.housesale.hibernate.Community) obj;
			if (null == this.getCommunityId() || null == community.getCommunityId()) return false;
			else return (this.getCommunityId().equals(community.getCommunityId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getCommunityId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getCommunityId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?