⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customersource.java

📁 Athena酒店小组_Athena酒店管理系统
💻 JAVA
字号:
/*
 * CustomerSource.java
 *
 * Created on 2007年6月4日, 下午10:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package temp;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 实体类 CustomerSource
 * 
 * @author Virlene Cheng
 */
@Entity
@Table(name = "CustomerSource")
public class CustomerSource implements Serializable
{

	@Id
	@Column(name = "SourceId", nullable = false)
	private String sourceId;

	@Column(name = "SourceName", nullable = false)
	private String sourceName;

	@Column(name = "Remark")
	private String remark;

	@OneToMany(cascade = CascadeType.ALL, mappedBy = "sourceId")
	private Collection<CustomerInfo> customerInfoCollection;
    
    /** Creates a new instance of CustomerSource */
    public CustomerSource()
    {
    }

	/**
	 * 使用指定的值创建 CustomerSource 的新实例。
	 * @param sourceId,CustomerSource 的 sourceId
	 */
	public CustomerSource(String sourceId)
	{
		this.sourceId = sourceId;
	}

	/**
	 * 使用指定的值创建 CustomerSource 的新实例。
	 * @param sourceId,CustomerSource 的 sourceId
	 * @param sourceName,CustomerSource 的 sourceName
	 */
	public CustomerSource(String sourceId, String sourceName)
	{
		this.sourceId = sourceId;
		this.sourceName = sourceName;
	}

	/**
	 * 获取此 CustomerSource 的 sourceId。
	 * @return sourceId
	 */
	public String getSourceId()
	{
		return this.sourceId;
	}

	/**
	 * 将此 CustomerSource 的 sourceId 设置为指定的值。
	 * @param sourceId,新建 sourceId
	 */
	public void setSourceId(String sourceId)
	{
		this.sourceId = sourceId;
	}

	/**
	 * 获取此 CustomerSource 的 sourceName。
	 * @return sourceName
	 */
	public String getSourceName()
	{
		return this.sourceName;
	}

	/**
	 * 将此 CustomerSource 的 sourceName 设置为指定的值。
	 * @param sourceName,新建 sourceName
	 */
	public void setSourceName(String sourceName)
	{
		this.sourceName = sourceName;
	}

	/**
	 * 获取此 CustomerSource 的 remark。
	 * @return remark
	 */
	public String getRemark()
	{
		return this.remark;
	}

	/**
	 * 将此 CustomerSource 的 remark 设置为指定的值。
	 * @param remark,新建 remark
	 */
	public void setRemark(String remark)
	{
		this.remark = remark;
	}

	/**
	 * 获取此 CustomerSource 的 customerInfoCollection。
	 * @return customerInfoCollection
	 */
	public Collection<CustomerInfo> getCustomerInfoCollection()
	{
		return this.customerInfoCollection;
	}

	/**
	 * 将此 CustomerSource 的 customerInfoCollection 设置为指定的值。
	 * @param customerInfoCollection,新建 customerInfoCollection
	 */
	public void setCustomerInfoCollection(Collection<CustomerInfo> customerInfoCollection)
	{
		this.customerInfoCollection = customerInfoCollection;
	}

	/**
	 * 返回对象的散列代码值。该实现根据此对象
	 * 中 id 字段计算散列代码值。
	 * @return 此对象的散列代码值。
	 */
	@Override
	public int hashCode()
	{
		int hash = 0;
		hash += (this.sourceId != null ? this.sourceId.hashCode() : 0);
		return hash;
	}

	/**
	 * 确定其他对象是否等于此 CustomerSource。当且仅当
	 * 参数不为 null 且该参数是具有与此对象相同 id 字段值的 CustomerSource 对象时,
	 * 结果才为 <code>true</code>。
	 * @param 对象,要比较的引用对象
	 * 如果此对象与参数相同,则 @return <code>true</code>;
	 * 否则为 <code>false</code>。
	 */
	@Override
	public boolean equals(Object object)
	{
		// TODO: Warning - this method won't work in the case the id fields are not set
		if (!(object instanceof CustomerSource)) {
			return false;
		}
		CustomerSource other = (CustomerSource)object;
		if (this.sourceId != other.sourceId && (this.sourceId == null || !this.sourceId.equals(other.sourceId))) return false;
		return true;
	}

	/**
	 * 返回对象的字符串表示法。该实现根据 id 字段
	 * 构造此表示法。
	 * @return 对象的字符串表示法。
	 */
	@Override
	public String toString()
	{
		return "temp.CustomerSource[sourceId=" + sourceId + "]";
	}
    
}

⌨️ 快捷键说明

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