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

📄 customerinfo.java

📁 Athena酒店小组_Athena酒店管理系统
💻 JAVA
字号:
/*
 * CustomerInfo.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 java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

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

	@Id
	@Column(name = "CustomerId", nullable = false)
	private String customerId;

	@Column(name = "Name")
	private String name;

	@Column(name = "EnglishName")
	private String englishName;

	@Column(name = "Sex")
	private Character sex;

	@Column(name = "Citizenship")
	private String citizenship;

	@Column(name = "Nation")
	private String nation;

	@Column(name = "Birthplace")
	private String birthplace;

	@Column(name = "ID", nullable = false)
	private String id;

	@Column(name = "Birthday")
	@Temporal(TemporalType.TIMESTAMP)
	private Date birthday;

	@Column(name = "Marriage")
	private String marriage;

	@Column(name = "Career")
	private String career;

	@Column(name = "Religion")
	private String religion;

	@Column(name = "CustomerType")
	private String customerType;

	@Column(name = "Blacklist")
	private Boolean blacklist;

	@Column(name = "Cellphone")
	private String cellphone;

	@Column(name = "HomeTel")
	private String homeTel;

	@Column(name = "OfficeTel")
	private String officeTel;

	@Column(name = "Fax")
	private String fax;

	@Column(name = "MSN")
	private String msn;

	@Column(name = "Email")
	private String email;

	@Column(name = "Company")
	private String company;

	@Column(name = "Post")
	private String post;

	@Column(name = "Address")
	private String address;

	@OneToMany(cascade = CascadeType.ALL, mappedBy = "customerId")
	private Collection<CustomerRecord> customerRecordCollection;

	@OneToMany(cascade = CascadeType.ALL, mappedBy = "customerId")
	private Collection<CustomerCard> customerCardCollection;

	@OneToOne(cascade = CascadeType.ALL, mappedBy = "customerInfo")
	private CustomerAnniversary customerAnniversary;

	@JoinColumn(name = "SourceId", referencedColumnName = "SourceId")
	@ManyToOne
	private CustomerSource sourceId;
    
    /** Creates a new instance of CustomerInfo */
    public CustomerInfo()
    {
    }

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

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

	/**
	 * 获取此 CustomerInfo 的 customerId。
	 * @return customerId
	 */
	public String getCustomerId()
	{
		return this.customerId;
	}

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

	/**
	 * 获取此 CustomerInfo 的 name。
	 * @return name
	 */
	public String getName()
	{
		return this.name;
	}

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

	/**
	 * 获取此 CustomerInfo 的 englishName。
	 * @return englishName
	 */
	public String getEnglishName()
	{
		return this.englishName;
	}

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

	/**
	 * 获取此 CustomerInfo 的 sex。
	 * @return sex
	 */
	public Character getSex()
	{
		return this.sex;
	}

	/**
	 * 将此 CustomerInfo 的 sex 设置为指定的值。
	 * @param sex,新建 sex
	 */
	public void setSex(Character sex)
	{
		this.sex = sex;
	}

	/**
	 * 获取此 CustomerInfo 的 citizenship。
	 * @return citizenship
	 */
	public String getCitizenship()
	{
		return this.citizenship;
	}

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

	/**
	 * 获取此 CustomerInfo 的 nation。
	 * @return nation
	 */
	public String getNation()
	{
		return this.nation;
	}

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

	/**
	 * 获取此 CustomerInfo 的 birthplace。
	 * @return birthplace
	 */
	public String getBirthplace()
	{
		return this.birthplace;
	}

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

	/**
	 * 获取此 CustomerInfo 的 id。
	 * @return id
	 */
	public String getId()
	{
		return this.id;
	}

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

	/**
	 * 获取此 CustomerInfo 的 birthday。
	 * @return birthday
	 */
	public Date getBirthday()
	{
		return this.birthday;
	}

	/**
	 * 将此 CustomerInfo 的 birthday 设置为指定的值。
	 * @param birthday,新建 birthday
	 */
	public void setBirthday(Date birthday)
	{
		this.birthday = birthday;
	}

	/**
	 * 获取此 CustomerInfo 的 marriage。
	 * @return marriage
	 */
	public String getMarriage()
	{
		return this.marriage;
	}

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

	/**
	 * 获取此 CustomerInfo 的 career。
	 * @return career
	 */
	public String getCareer()
	{
		return this.career;
	}

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

	/**
	 * 获取此 CustomerInfo 的 religion。
	 * @return religion
	 */
	public String getReligion()
	{
		return this.religion;
	}

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

	/**
	 * 获取此 CustomerInfo 的 customerType。
	 * @return customerType
	 */
	public String getCustomerType()
	{
		return this.customerType;
	}

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

	/**
	 * 获取此 CustomerInfo 的 blacklist。
	 * @return blacklist
	 */
	public Boolean getBlacklist()
	{
		return this.blacklist;
	}

	/**
	 * 将此 CustomerInfo 的 blacklist 设置为指定的值。
	 * @param blacklist,新建 blacklist
	 */
	public void setBlacklist(Boolean blacklist)
	{
		this.blacklist = blacklist;
	}

	/**
	 * 获取此 CustomerInfo 的 cellphone。
	 * @return cellphone
	 */
	public String getCellphone()
	{
		return this.cellphone;
	}

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

	/**
	 * 获取此 CustomerInfo 的 homeTel。
	 * @return homeTel
	 */
	public String getHomeTel()
	{
		return this.homeTel;
	}

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

	/**
	 * 获取此 CustomerInfo 的 officeTel。
	 * @return officeTel
	 */
	public String getOfficeTel()
	{
		return this.officeTel;
	}

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

	/**
	 * 获取此 CustomerInfo 的 fax。
	 * @return fax
	 */
	public String getFax()
	{
		return this.fax;
	}

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

	/**
	 * 获取此 CustomerInfo 的 msn。
	 * @return msn
	 */
	public String getMsn()
	{
		return this.msn;
	}

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

	/**
	 * 获取此 CustomerInfo 的 email。
	 * @return email
	 */
	public String getEmail()
	{
		return this.email;
	}

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

	/**
	 * 获取此 CustomerInfo 的 company。
	 * @return company
	 */
	public String getCompany()
	{
		return this.company;
	}

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

	/**
	 * 获取此 CustomerInfo 的 post。
	 * @return post
	 */
	public String getPost()
	{
		return this.post;
	}

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

	/**
	 * 获取此 CustomerInfo 的 address。
	 * @return address
	 */
	public String getAddress()
	{
		return this.address;
	}

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

	/**
	 * 获取此 CustomerInfo 的 customerRecordCollection。
	 * @return customerRecordCollection
	 */
	public Collection<CustomerRecord> getCustomerRecordCollection()
	{
		return this.customerRecordCollection;
	}

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

	/**
	 * 获取此 CustomerInfo 的 customerCardCollection。
	 * @return customerCardCollection
	 */
	public Collection<CustomerCard> getCustomerCardCollection()
	{
		return this.customerCardCollection;
	}

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

	/**
	 * 获取此 CustomerInfo 的 customerAnniversary。
	 * @return customerAnniversary
	 */
	public CustomerAnniversary getCustomerAnniversary()
	{
		return this.customerAnniversary;
	}

	/**
	 * 将此 CustomerInfo 的 customerAnniversary 设置为指定的值。
	 * @param customerAnniversary,新建 customerAnniversary
	 */
	public void setCustomerAnniversary(CustomerAnniversary customerAnniversary)
	{
		this.customerAnniversary = customerAnniversary;
	}

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

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

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

	/**
	 * 确定其他对象是否等于此 CustomerInfo。当且仅当
	 * 参数不为 null 且该参数是具有与此对象相同 id 字段值的 CustomerInfo 对象时,
	 * 结果才为 <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 CustomerInfo)) {
			return false;
		}
		CustomerInfo other = (CustomerInfo)object;
		if (this.customerId != other.customerId && (this.customerId == null || !this.customerId.equals(other.customerId))) return false;
		return true;
	}

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

⌨️ 快捷键说明

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