📄 depotinfo.java
字号:
/*
* DepotInfo.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;
/**
* 实体类 DepotInfo
*
* @author Virlene Cheng
*/
@Entity
@Table(name = "DepotInfo")
public class DepotInfo implements Serializable
{
@Id
@Column(name = "DepotID", nullable = false)
private String depotID;
@Column(name = "DepotName", nullable = false)
private String depotName;
@Column(name = "Location", nullable = false)
private String location;
@Column(name = "Principal")
private String principal;
@Column(name = "Tel")
private String tel;
@Column(name = "Remark")
private String remark;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "depotID")
private Collection<GoodInInfo> goodInInfoCollection;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "depotID")
private Collection<GoodsOutInfo> goodsOutInfoCollection;
/** Creates a new instance of DepotInfo */
public DepotInfo()
{
}
/**
* 使用指定的值创建 DepotInfo 的新实例。
* @param depotID,DepotInfo 的 depotID
*/
public DepotInfo(String depotID)
{
this.depotID = depotID;
}
/**
* 使用指定的值创建 DepotInfo 的新实例。
* @param depotID,DepotInfo 的 depotID
* @param depotName,DepotInfo 的 depotName
* @param location,DepotInfo 的 location
*/
public DepotInfo(String depotID, String depotName, String location)
{
this.depotID = depotID;
this.depotName = depotName;
this.location = location;
}
/**
* 获取此 DepotInfo 的 depotID。
* @return depotID
*/
public String getDepotID()
{
return this.depotID;
}
/**
* 将此 DepotInfo 的 depotID 设置为指定的值。
* @param depotID,新建 depotID
*/
public void setDepotID(String depotID)
{
this.depotID = depotID;
}
/**
* 获取此 DepotInfo 的 depotName。
* @return depotName
*/
public String getDepotName()
{
return this.depotName;
}
/**
* 将此 DepotInfo 的 depotName 设置为指定的值。
* @param depotName,新建 depotName
*/
public void setDepotName(String depotName)
{
this.depotName = depotName;
}
/**
* 获取此 DepotInfo 的 location。
* @return location
*/
public String getLocation()
{
return this.location;
}
/**
* 将此 DepotInfo 的 location 设置为指定的值。
* @param location,新建 location
*/
public void setLocation(String location)
{
this.location = location;
}
/**
* 获取此 DepotInfo 的 principal。
* @return principal
*/
public String getPrincipal()
{
return this.principal;
}
/**
* 将此 DepotInfo 的 principal 设置为指定的值。
* @param principal,新建 principal
*/
public void setPrincipal(String principal)
{
this.principal = principal;
}
/**
* 获取此 DepotInfo 的 tel。
* @return tel
*/
public String getTel()
{
return this.tel;
}
/**
* 将此 DepotInfo 的 tel 设置为指定的值。
* @param tel,新建 tel
*/
public void setTel(String tel)
{
this.tel = tel;
}
/**
* 获取此 DepotInfo 的 remark。
* @return remark
*/
public String getRemark()
{
return this.remark;
}
/**
* 将此 DepotInfo 的 remark 设置为指定的值。
* @param remark,新建 remark
*/
public void setRemark(String remark)
{
this.remark = remark;
}
/**
* 获取此 DepotInfo 的 goodInInfoCollection。
* @return goodInInfoCollection
*/
public Collection<GoodInInfo> getGoodInInfoCollection()
{
return this.goodInInfoCollection;
}
/**
* 将此 DepotInfo 的 goodInInfoCollection 设置为指定的值。
* @param goodInInfoCollection,新建 goodInInfoCollection
*/
public void setGoodInInfoCollection(Collection<GoodInInfo> goodInInfoCollection)
{
this.goodInInfoCollection = goodInInfoCollection;
}
/**
* 获取此 DepotInfo 的 goodsOutInfoCollection。
* @return goodsOutInfoCollection
*/
public Collection<GoodsOutInfo> getGoodsOutInfoCollection()
{
return this.goodsOutInfoCollection;
}
/**
* 将此 DepotInfo 的 goodsOutInfoCollection 设置为指定的值。
* @param goodsOutInfoCollection,新建 goodsOutInfoCollection
*/
public void setGoodsOutInfoCollection(Collection<GoodsOutInfo> goodsOutInfoCollection)
{
this.goodsOutInfoCollection = goodsOutInfoCollection;
}
/**
* 返回对象的散列代码值。该实现根据此对象
* 中 id 字段计算散列代码值。
* @return 此对象的散列代码值。
*/
@Override
public int hashCode()
{
int hash = 0;
hash += (this.depotID != null ? this.depotID.hashCode() : 0);
return hash;
}
/**
* 确定其他对象是否等于此 DepotInfo。当且仅当
* 参数不为 null 且该参数是具有与此对象相同 id 字段值的 DepotInfo 对象时,
* 结果才为 <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 DepotInfo)) {
return false;
}
DepotInfo other = (DepotInfo)object;
if (this.depotID != other.depotID && (this.depotID == null || !this.depotID.equals(other.depotID))) return false;
return true;
}
/**
* 返回对象的字符串表示法。该实现根据 id 字段
* 构造此表示法。
* @return 对象的字符串表示法。
*/
@Override
public String toString()
{
return "temp.DepotInfo[depotID=" + depotID + "]";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -