basehousesale.java

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

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

import java.io.Serializable;


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

public abstract class BaseHouseSale  implements Serializable {

	public static String REF = "HouseSale";
	public static String PROP_SALE_PAYMENT = "salePayment";
	public static String PROP_HOUSE = "house";
	public static String PROP_PAY_MONEY = "payMoney";
	public static String PROP_REMAIN = "remain";
	public static String PROP_SALE_ID = "saleId";
	public static String PROP_CUSTOMER = "customer";
	public static String PROP_SALE_STATE = "saleState";
	public static String PROP_BZ = "bz";
	public static String PROP_TOTAL = "total";
	public static String PROP_SALE_MANAGER = "saleManager";
	public static String PROP_SALE_TIME = "saleTime";


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

	/**
	 * Constructor for primary key
	 */
	public BaseHouseSale (java.lang.Integer saleId) {
		this.setSaleId(saleId);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.util.Date saleTime;
	private java.lang.String saleState;
	private java.lang.String saleManager;
	private java.lang.Long total;
	private java.lang.Long salePayment;
	private java.lang.Long payMoney;
	private java.lang.Long remain;
	private java.lang.String bz;

	// many to one
	private com.housesale.hibernate.Customer customer;
	private com.housesale.hibernate.House house;

	// collections
	private java.util.Set<com.housesale.hibernate.Payment> payments;



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

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




	/**
	 * Return the value associated with the column: SaleTime
	 */
	public java.util.Date getSaleTime () {
		return saleTime;
	}

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



	/**
	 * Return the value associated with the column: SaleState
	 */
	public java.lang.String getSaleState () {
		return saleState;
	}

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



	/**
	 * Return the value associated with the column: SaleManager
	 */
	public java.lang.String getSaleManager () {
		return saleManager;
	}

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



	/**
	 * Return the value associated with the column: Total
	 */
	public java.lang.Long getTotal () {
		return total;
	}

	/**
	 * Set the value related to the column: Total
	 * @param total the Total value
	 */
	public void setTotal (java.lang.Long total) {
		this.total = total;
	}



	/**
	 * Return the value associated with the column: SalePayment
	 */
	public java.lang.Long getSalePayment () {
		return salePayment;
	}

	/**
	 * Set the value related to the column: SalePayment
	 * @param salePayment the SalePayment value
	 */
	public void setSalePayment (java.lang.Long salePayment) {
		this.salePayment = salePayment;
	}



	/**
	 * Return the value associated with the column: PayMoney
	 */
	public java.lang.Long getPayMoney () {
		return payMoney;
	}

	/**
	 * Set the value related to the column: PayMoney
	 * @param payMoney the PayMoney value
	 */
	public void setPayMoney (java.lang.Long payMoney) {
		this.payMoney = payMoney;
	}



	/**
	 * Return the value associated with the column: Remain
	 */
	public java.lang.Long getRemain () {
		return remain;
	}

	/**
	 * Set the value related to the column: Remain
	 * @param remain the Remain value
	 */
	public void setRemain (java.lang.Long remain) {
		this.remain = remain;
	}



	/**
	 * 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: CustomerID
	 */
	public com.housesale.hibernate.Customer getCustomer () {
		return customer;
	}

	/**
	 * Set the value related to the column: CustomerID
	 * @param customer the CustomerID value
	 */
	public void setCustomer (com.housesale.hibernate.Customer customer) {
		this.customer = customer;
	}



	/**
	 * Return the value associated with the column: HouseID
	 */
	public com.housesale.hibernate.House getHouse () {
		return house;
	}

	/**
	 * Set the value related to the column: HouseID
	 * @param house the HouseID value
	 */
	public void setHouse (com.housesale.hibernate.House house) {
		this.house = house;
	}



	/**
	 * Return the value associated with the column: payments
	 */
	public java.util.Set<com.housesale.hibernate.Payment> getPayments () {
		return payments;
	}

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

	public void addTopayments (com.housesale.hibernate.Payment payment) {
		if (null == getPayments()) setPayments(new java.util.TreeSet<com.housesale.hibernate.Payment>());
		getPayments().add(payment);
	}




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

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


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


}

⌨️ 快捷键说明

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