basecustomerfunction.java

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

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

import java.io.Serializable;


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

public abstract class BaseCustomerFunction  implements Serializable {

	public static String REF = "CustomerFunction";
	public static String PROP_FUNCTION_ID = "functionId";
	public static String PROP_CUSTOMER = "customer";
	public static String PROP_ID = "id";


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

	/**
	 * Constructor for primary key
	 */
	public BaseCustomerFunction (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String functionId;

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



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

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




	/**
	 * Return the value associated with the column: FunctionID
	 */
	public java.lang.String getFunctionId () {
		return functionId;
	}

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



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




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

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


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


}

⌨️ 快捷键说明

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