basecustomer.java

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

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

import java.io.Serializable;


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

public abstract class BaseCustomer  implements Serializable {

	public static String REF = "Customer";
	public static String PROP_TEL1 = "tel1";
	public static String PROP_REGISTER_TIME = "registerTime";
	public static String PROP_PASSWORD = "password";
	public static String PROP_EMAIL = "email";
	public static String PROP_IDCARD = "idcard";
	public static String PROP_ADDRESS = "address";
	public static String PROP_CUSTOMER_NAME = "customerName";
	public static String PROP_CUSTOMER_ID = "customerId";
	public static String PROP_TEL2 = "tel2";
	public static String PROP_BZ = "bz";


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

	/**
	 * Constructor for primary key
	 */
	public BaseCustomer (java.lang.Integer customerId) {
		this.setCustomerId(customerId);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String customerName;
	private byte[] password;
	private java.lang.String idcard;
	private java.lang.String address;
	private java.lang.Integer tel1;
	private java.lang.Integer tel2;
	private java.lang.String email;
	private java.util.Date registerTime;
	private java.lang.String bz;

	// collections
	private java.util.Set<com.housesale.hibernate.HouseSale> houseSales;
	private java.util.Set<com.housesale.hibernate.CustomerFunction> customerFunctions;
	private java.util.Set<com.housesale.hibernate.HouseCheck> houseChecks;



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

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




	/**
	 * Return the value associated with the column: CustomerName
	 */
	public java.lang.String getCustomerName () {
		return customerName;
	}

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



	/**
	 * Return the value associated with the column: Password
	 */
	public byte[] getPassword () {
		return password;
	}

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



	/**
	 * Return the value associated with the column: IDCard
	 */
	public java.lang.String getIdcard () {
		return idcard;
	}

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



	/**
	 * 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: 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: Email
	 */
	public java.lang.String getEmail () {
		return email;
	}

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



	/**
	 * Return the value associated with the column: RegisterTime
	 */
	public java.util.Date getRegisterTime () {
		return registerTime;
	}

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



	/**
	 * 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: 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);
	}



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

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

	public void addTocustomerFunctions (com.housesale.hibernate.CustomerFunction customerFunction) {
		if (null == getCustomerFunctions()) setCustomerFunctions(new java.util.TreeSet<com.housesale.hibernate.CustomerFunction>());
		getCustomerFunctions().add(customerFunction);
	}



	/**
	 * 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);
	}




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

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


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


}

⌨️ 快捷键说明

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